Tricentis Tosca Best Practices - Variables
The following best practices provide guidelines on working with variables in Tricentis Tosca. To see an overview of all best practices, head on over to our introduction article. You will also find the best practices in a PDF version at the bottom of this page.
1. Create Test Configuration Parameters on the highest possible level
Test Configuration Parameters inherit the data from the level above, so by setting the Test Configuration Parameter on the highest possible level all the levels under it will get the same data. This will make it easier to maintain the TestConfigurationParameters. You can still adjust the data for a lower level without adjusting the higher level.
By defining Test Configuration Parameters on the highest level in Tricentis Tosca, they apply to every level, which makes it easier to maintain the TestSet.
2. Use a buffer only within one TestCase
Setting, adjusting and using a buffer within one TestCase ensures that data is not used from different TestCases. Buffers are set on the device where you run the TestCase on. Therefore, using a buffer that was set on a previous TestCase might create potential problems as this is not set on the machine executing your current TestCase. There might also be a problem with old data, if the TestCase has not been run in a while. By setting, adjusting and using the buffer only in one TestCase you make sure that the data is always up to date and the buffer is always created and available.
Using a buffer only within one TestCase ensures that you are using data that is up to date and not from another TestCase.
3. Store shared settings in the project settings
Using project settings instead of workspace settings ensures that everyone (including Agents) has the same settings. This eliminates problems that could stem from different synchronization times, different extension locations, or other settings. These settings are saved in the common repository, so everybody is up to date as soon as they press the update all button.
Storing shared settings in the project settings makes sure that everyone is using the same settings, thus eliminating different sources of errors.
4. Use the same configuration across all machines used
Using the same configuration on every machine ensures that all your TestCases will be able to run the same on every machine. This could include screen resolution, RAM size or operating system specific settings.
Using the same configuration on all machines will help you to make sure that that your TestCases will run the same on all your machines.