IMPORTANT NOTICE: As of 21 February, anything posted in this community WILL NOT BE MIGRATED to our new community site. We have pulled all user information and data from this site and are now in an approximately week long process of importing users, roles, and data to our new site. We are leaving this site open and active so you can post and hopefully get a response until the migration is complete. Once complete, the URL that currently takes you to this site will take you to our new site so your bookmarks will work as always. Please read the information on a New Login Process
An "Application State" is a state that an application is required to be in after the base state is restored, but before running one or more testcases. Creating an "Application State" is creating reusable code that saves space and time. Furthermore, if the set-up stage needs to be modified , it can be changed once, in the "Application State" routine.
Once the new Appstate has been created, the "Paste to Editor" button will then paste the appstate in the correct location. Once here, it can be modified if necessary. Below is a simple example of an Appstate which will first call the DefaultBaseState and once the TestApp has been launched, will then open the PopupList dialog box ;
[-] appstate MyAppstate1() basedon DefaultBaseState [ ] TestApplication.SetActive () [ ] TestApplication.Control.PopupList.Pick () [ ] PopupList1.SetActive ()
[-] testcase Test1 () appstate MyAppstate1 [ ] [ ] PopupList1.ItemType.Select ("Text and graphic") [ ] PopupList1.TextItem.SetText ("one") [ ] PopupList1.GraphicItem.Select ("#2") [ ] PopupList1.AddItem.Click ()
When using the Record -> Testcase option, a user can chose which "Application State" the new testcase is to be based on from the dropdownlist .