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

Automating Tests and Passing Parameters


#1

Hi Guys

We’ve new to TestRail and have most of our test cases entered. We’re not starting to look at automation. One of our developers is going to work on the service for our end. The software we are using does a lot of calculations and results are in a SQL server database

The database will contain master date which is the expected results.

One test case, involves the tester creating a new job and doing a bunch of steps with it. We then want the tester to click a button that will (compare values in the new job create with the master). However, the job number is auto generated, so will not be known in advance. We typically enter it in the Actual Results. other test will need to pass other references to objects in the application (e.q. quote no, PO No, invoice no,)

So how would I call our service and pass one of these parameters? I looked at the API and all I see is

function execute_test($run_id, $case_id, $test_id)
{

}

I somehow need a place to enter, for example, a job no, quote no, PO No, invoice no to be comapred against the master data

Regards

mark


#2

Hi Mark,

Thanks for your posting. We recommend executing automated tests outside of TestRail and then submitting the test results via TestRail’s API afterwards:

http://docs.gurock.com/testrail-api2/start

To manage additional fields, you can simply add custom fields in TestRail and then also include those fields when adding test results:

http://docs.gurock.com/testrail-userguide/howto-fields

Have you already seen our blog posting on how other teams use TestRail with their automated tests? This should be a good starting point:

https://blog.gurock.com/testrail-test-automation-test-management/

Cheers,
Tobias


#3

Hi Tobias

Went through the info and working on a proof of concept. Stuck on one thing: I need the tester to be able to run tests while adding results, for example, they are executing manuals tests and at Step 3, they need to call an automated test that will enter an actual result, and then they continue to step 4

Is this possible?

Regards

Mark


#4

Hi Mark,

We would usually advice against this level of integration and executing automated tests outside of TestRail is much more flexible. In case your manual and automated tests are very related, what’s often done is to add a test plan that includes both your manual and automated tests (often in different runs). You would then go through the manual tests in TestRail and the automated tests/results are submitted via TestRail’s API. The advantage of the test plan is that both the manual and automated tests are grouped under the same entity and you have combined statistics/percentages for all tests.

Cheers,
Tobias