GithubHelp home page GithubHelp logo

Comments (3)

jonrgurock avatar jonrgurock commented on July 23, 2024

Hi @syedghayyour ,

Looking at your code sample, I do not see where you add the suite_id key/value pair to the data object.
Can you ensure the field is being added to the body of your POST request via debug lines?

If you continue to have issues after verifying the field is in the body of your request, please reach out to our support team at [email protected] and mention this thread so our team can assist you further with this issue.

Regards,
Jon

from testrail-api.

syedghayyour avatar syedghayyour commented on July 23, 2024

HI Jon I have added the key and value pair here: #12

ctx.setAttribute("suiteID" ,suite_id);

from testrail-api.

jonrgurock avatar jonrgurock commented on July 23, 2024

@syedghayyour

In your code, I see the following:

	Map data = new HashMap();
	data.put("include_all",true);
	data.put("name","Test Run "+System.currentTimeMillis());
	JSONObject c = null;
	
	c = (JSONObject)client.sendPost("add_run/"+PROJECT_ID,data);

The error is appears to be returned by line:

c = (JSONObject)client.sendPost("add_run/"+PROJECT_ID,data);

Prior to sending the API request, the data object does not contain the suite_id and value.

Please try updating your code to the following:

	Map data = new HashMap();
	data.put("include_all",true);
	data.put("name","Test Run "+System.currentTimeMillis());
	data.put("suite_id",SUITE_ID);  //Add this or a similar line which aligns with your code and variables
	JSONObject c = null;
	
	c = (JSONObject)client.sendPost("add_run/"+PROJECT_ID,data);

If you continue to have issues after adding the field to the data object, please reach out to our support team at [email protected] and mention this thread so our team can assist you further with this issue.

Thank you,
Jon

from testrail-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.