Hello,
we have created a data driven test in Test Studio. We have a specific situation where there are 5 different options to be chosen and these options are the main difference between iterations. Each iteration enters a different username on login and, depending on test user type, after clicking the login button different page should be displayed for each type of user. Everything is fine but after the test completes we don't know how to clearly state in our test results what type of user was logging in.
The question is, can we add a custom message as the first step in test which will be bound to a column in datasheet containing the types of users and for every iteration that message will state which type of user was trying to login.
For example the message in the results would be something like:
It1: "Using regular user"
It2: "Using admin user" etc.
Is there a type of step where the code would make his construct string from hard coded part and variable from datasheet and then display it in test results?
We are using VB as code behind coded steps.
Thanks
5 Answers, 1 is accepted
Is there a type of step where the code would make his construct string from hard coded part and variable from datasheet and then display it in test results?
Correction: Is there a type of step where the code would construct a string from hard coded string and a variable and then display it in test results as a message?
Thank you very much for the prompt description of your requirements.
I hope that the Custom Annotation step will fully suit your needs, as it is logged in the results and its value could be also data driven. Even if you do not display it on the screen, its result will be listed in the final test execution results.
Please let me know in case of further questions.
Regards,
Elena Tsvetkova
Progress Telerik
Test Studio Trainings
Hi Elena,
unfortunately this is not what we need. When we add an annotation and bind it to a column in datasheet we get the results as in attached screenshot "results with annotation.png".
We would like to produce a result as in attached screenshot "results with annotation 2.png". For this example "Pack request using: " would be a hardcoded string in the step title, while "Post" would be read from a cell value in datasheet.
Is this possible?
P.S.
If it helps you understand what we need, another tool called Micro Focus UFT has a Reporter.ReportEvent functionality which creates a custom step which we can name using a value from datasheet.
Thank you for getting back to me with the additional details.
I think I understand the exact scenario now and indeed, since the data driven custom annotation only shows the bound column name, it will not suit your needs. Then, another approach I can think of is to go ahead and try with a coded step which outputs some text in the log file. This can be data driven as well and will output the actual content of the respective cell instead the column name. To do that you will need to data bind a column in code which is described in this article and to use the Log.WriteLine() method.
Please, give this a try and let me know if you need any further assistance on the topic. I hope it helps.
Regards,
Elena Tsvetkova
Progress Telerik
Test Studio Trainings
