Thank you for the kind words about our product. If I understand correctly you want to reuse coded step in more then one test as you create a base class that contains these steps. I can say that this scenario is completely doable within Test Studio and I see that you have accomplished the most of it. However, as something might be missed and it is hard for me to tell what this could be, I will share the exact steps needed to accomplish the desired scenario. Having those, please check them out and let me know if they work on your side or the issue occurs again:
1. Create a test.
2. Add a step and convert it to code
3. Create a base class that inherits BaseWebAiiTest
. How to create external code file you can find here
4. Cut the code of the created coded step and paste it to the base class.
5. Change the base class of the test's code file with the new created base class.
6. Change the base test class in the settings of the project
. This can be done in the Code Base Class
filed in the Recording tab, by adding the name of your base class there.
Additionally, I managed to develop a Test Studio project that represents all the above steps. For your convenience, I have attached this project to my reply.
Meanwhile, it is also important to note that we found an issue related to the UI of the coded steps. The problem is that, the base methods are missing in the coded step list methods drop down. Still, this is only a visual glitch and the steps should still execute without issues when you run the test. Further, you can also track the status of this issue as it is already added
in our feedback portal.
As for the 'test as a step' functionality, I believe this is indeed the better approach for reusing steps in different tests. This is mainly because, this way you can create 'test as a step' steps for all tests that have to execute the shared actions.
I hope the above helps. If there are any further questions or issues, please do let me know.