Adding Tests to Test Suites
Once the test suites have been created, you can add the list of tests in each test suite. This is usually done by running the full set of tests in each test suite once using the TestBrain CI Script so that test results are automatically imported into TestBrain. It is also possible to import the list of tests in each test suite directly through the GUI.
Note that only the names of the tests (and test results) are imported into TestBrain, not the actual tests which remain wherever you normally maintain your tests.
Once all the test suites have been created and the tests populated, the following step is to do an initial mapping of the tests to the functional code areas.
Adding Tests to Test Suites Automatically
To add tests to the test suite automatically, run the CI script below for each test suite. It will not run any tests, but will push a list of tests in the test suite to TestBrain through the API. The argument TESTSUITE must match an existing named test suite or it will generate the error “TestSuite not found”.
This script with all arguments can be generated from the CI Script screen. Select the project and Test Suite. Under Test Section, select the ‘no tests’ option.
You can also create the CI Script by hand with the following syntax:
python RunTestsWithAppsurify.py –url “<APPSURIFY URL>” –apikey “<APIKEY>” –testsuite “<TESTSUITE>” –runtemplate <Template> –testtemplate <Template>
For details on the arguments for this script, see CI Script.
Repeat this process for each test suite.
Adding Tests to Test Suites via GUI
The list of tests in each test suite can also be imported through the GUI using a test report from a previous test run. To import test through the GUI, go to the project configuration page by selecting Projects on the left menu, select the project from the drop down on the top left, then click the configuration gear button.
From the project configuration page, select the Imports tab.
Choose the report format (junit, nunit, or other proprietary formats), select the test suite, and if applicable choose the commit the report applies to. Then drag and drop the test report file where indicated, or click the panel to select the panel to browse for file. Click Upload to import.
Repeat this process for each test suite. Or alternatively, combine all of the test suites using this shell script – https://github.com/Appsurify/AppsurifyCIScript/tree/master/Junit%20Combine%20Script
To manually add additional tests to test suites, click the + button next to the test suite.