Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

How can I use id_case for identification Test run id_run


My test look like that :

I use id_case for test cases but I need id_run to save test results to test runs.

Now i must use id_run and id case.

How can I use only id_case in my test cases?

testNG +selenium+maven


You can’t use only case ID, it’s not enough to determinate where to save results.
When you add a case into a test run, you create a new object which is called test. So to save a result of the test you should provide the ID of the case AND ID of the test run (Or just provide the test ID). Because the same case could be added into several test runs and it will two different tests with two different IDs.