GithubHelp home page GithubHelp logo

Comments (3)

jonrgurock avatar jonrgurock commented on July 23, 2024

Hi @wrathmelior,

When using add_result_for_case, you should be passing the test run ID and case ID as parameters in your request. Based on your code, you are submitting the suite ID instead of the run ID and this appears to be the cause of the error message.

If you continue to have issues submitting API requests, please reach out to the support team at [email protected].

The issues for this repository are primarily used for reporting issues with the TestRail API bindings, or other code inside this repository.

Regards,
Jon

from testrail-api.

wrathmelior avatar wrathmelior commented on July 23, 2024

The 'suite_id' being used here should be the test run id generated earlier in the run in my super class with this code

@BeforeSuite
public void createSuite(ITestContext ctx) throws IOException, APIException {
client = new APIClient("https://company.testrail.com/");
client.setUser("[email protected]");
client.setPassword("password");
long yourmilliseconds = System.currentTimeMillis();
SimpleDateFormat sdf = new SimpleDateFormat("MMM dd,yyyy HH:mm");    
Date resultdate = new Date(yourmilliseconds);
Map data = new HashMap();
data.put("suite_id", 856);
data.put("include_all", true);
data.put("name" ,"Android BVT Automation Run - " + resultdate);
JSONObject c = null;
System.out.println("data: " + data);
c = (JSONObject)client.sendPost("add_run/"+102,data);
Long suite_id = (Long)c.get("id");
ctx.setAttribute("suiteId",suite_id);
}

https://monosnap.com/file/4ySvninX8fzEmjYEZQK3MU6RvqsZrh
https://i.imgur.com/RGmimaL.png

from testrail-api.

jonrgurock avatar jonrgurock commented on July 23, 2024

Hi @wrathmelior,

Please reach out to our support team at [email protected] so one of our support engineers can further assist you.

Regards,
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.