I have been doing some re-factoring of my tests and I wonder if others have developed ways to figure out how bet to do these things.
For example, Say that I have a 3-page web app, I would like to set up a test like:
Each step contains 5 mini-steps. Then if I wanted a different "Page1" experience, I could re-use the other pages' steps.
But I cannot do this. The way environment variables are implemented causes problems. I need an environment variable to be set within all the steps. This works when I run the test as a whole. But say there is a problem with the test in the middle of Page1Step. I can:
- click on the 'LoginStep' in the test and select Run -> To Here.
- let this run.
- open the Page1Step and select the first 4 mini-steps and select Run -> Selected Steps.
But this does not work. After the LoginStep finishes, the process ends. If I start the mini-steps in Page1Step, they do not see the environment variables. So, if I am going to execute to the middle of Page1Step, then LoginStep and Page1Step need to be jammed together into one step, so that they run in one process.
To put this another way, I cannot point to a step inside Page1Step and say run 'To Here' to that step within ASmartTest. I want to point to the 3rd step inside Page1Step and say run 'To Here' and have that mean 'run all of test steps in ASmartTest before this step and the mini-steps to here in this step'. And there seems to be no way to do that. Am I wrong?
To offer another solution, executing run 'To Here' could serialize the environment and reload those serialized variables when a 'Run Selected' is run. There is more than one way to fix this. Can something be done?
Any other suggestions?
thanx - ray