In addition to creating new test cases in the platform as we described in the How to Create a New Test Case course, test cases can also be created offline in Excel and imported into the Applause platform as a CSV file. Alternatively, test cases can be imported from the TestRail system; for more on that see the Importing Test Cases from TestRail course.
In order to be able to import test cases in a CSV file, the CSV files need to be read and the columns mapped to the test case fields.
One of these CSV templates can be used for writing test cases and importing them into the platform:
Note: Sometimes, due to your computer's regional settings, when opening a CSV file, all data might appear in one single column. Follow these instructions to fix it.
Let’s take a look at the first sample. The titles of columns can be anything, as long as they are mapped correctly to the fields when importing into the platform.
Exernal Key
It’s a good practice to have an External Key (ID) for each test case to not get confused in case there are many identical test case names. Since this is an attribute of a test case, it needs to be used in the Header rows of each test case.
Test Case Name
This can be called Title as well, and will be used as a Test Case Name when mapping in the platform. Should also be used in Header rows for each test case.
Test Case Description
Enter a description for the test case here. Should be used only in Header rows for each test case.
Test Suite
Test Suite is an optional column, and you can specify one or more values for it. If you specify multiple test suites, a comma “,” has to be used as a separator. In case you specify multiple test suites for a test case, the Applause platform will assign the test case to each of the test suites in the same product upon import.
Folder
If the test cases need to be put into a folder, add a “Folder” column to the CSV file specifying a folder path for each test case. This option will be available only if a Test Suite has been either added as a column to the CSV file or if it’s specified in the platform when importing the test cases. The folder is created only when the test case is created first.
Note: The Applause platform has a maximum of 3 levels of folders. If the imported folder path contains more than 3 levels, the test case will be put in the third level.
Step Instructions
Input the step instruction or description the tester should perform. It should be as clear as possible.
Expected Result
Input what the tester should see or experience when the instruction is performed.
Minimum Attachments Per Step
Input the number of required attachments the tester has to upload to the step.
Each step should appear on its own row. The test case can have as many steps as it needs to completely describe the desired process.
References
References is an optional field. There can be one or more Reference Value fields. It has 3 parts:
When performing the import, the import process parses the Reference values. The Reference cells can have single or multiple references.
The following format is expected for a single reference: [label]<reference>{integration}. For example, the string [this is my label]<www.google.com>{Jira}
is parsed as:
For multiple references, use “;” as a separator: [label]<reference>{integration};[label]<reference>{integration};[label]<reference>{integration}. For example, the string [this is my first label]<www.google.com>{Jira};[this is my second label]<www.bing.com>{Jira}
is parsed as:
The “{integration}” component will be expecting the following values:
The “{integration}” component is optional.
Priority
This is an optional field as well, and is set to None by default. It can take one of the following values: Critical, High, Medium, Low.
Saving the CSV File
After completing the test case writing, save the file as .csv.
The second sample contains all the steps of a test case in one row. It means that we will get a test case with a single step which contains all the content in the platform.
The External Key, Test Case Name, Test Case Description, Folder and References columns are the attributes of the test case as in the first sample. And the Step Instructions, Expected Result, Minimum Attachments per Step columns will be the attributes of a single step in the platform, meaning that the content of all these columns in each row will go into a single step in the platform.
After completing the test case writing, save the file as .csv.
Contact the Applause management team if assistance is needed with writing or importing test cases.
Once the CSV file with test cases is ready, import it by following the steps below:
When importing a CSV file for the first time, if the default field names in the platform match the CSV file's column headers, the fields will be automatically mapped saving you some clicks.
The Test Case Name column must exist in a CSV file to be able to import it.
And the following columns and values for them should exist in the CSV file (if not, default values can be set in the platform):
Additional optional fields that can be mapped to platform test case fields are:
External Key - Used for mapping with external test cases if there is any, and for identifying the existing test case in the platform.
Which field should be used to identify and update your existing test cases? - When you specify a field here, and then upload a new test case with the same field value, the old test case will be updated depending on the last update date.
Preconditions - You can specify any preconditions that need to be prepared in order to start executing the test case.
Component - If there is a component column in the CSV file that shows what component a test case belongs to, specify that column. Otherwise select a default component for all the test cases being imported, or keep it as none.
Test Suite - If there is a test suite column in the CSV file that shows what test suite a test case belongs to, specify that column. Otherwise select test suites existing in the platform for all the test cases being imported.
Folder - If the test cases need to be put into a folder, and a “Folder” column was added to the CSV file specifying a folder path for each test case, and then map the Folder column to this field. This option will be available only if the Test Suite has been specified. The folder is created only when the test case is created first.
Step Name - If each test case step has a name in the CSV file, specify the column name here, or you can set a default value.
Minimum Attachments per Step - If each step has a minimum attachment requirement, specify the column name here. If there is no such column, you can specify a default minimum value for each test case step. Otherwise set None - the attachments will be optional.
References - an optional field. There can be one or more Reference Value fields. It has 3 parts - Reference Label, Reference Value and Reference Integration.
In the Error Review stage the platform checks the CSV file and provides appropriate feedback as follows:
In order to fix the import errors:
To view the import logs:
A list with import logs for all the imported test cases will show up.
Click Download against the desired log to view it in detail.