How to implement

Class library usage, coding and language questions.
rawatankit6
Posts: 11
Joined: Thu Aug 21, 2014 7:50 pm

How to implement

Post by rawatankit6 » Tue Nov 04, 2014 7:43 pm

I have to implement create and edit functionality. For create I have to select multiple check boxes and move to the next page and validate those checkboxes labels exists then move to the next page to again validate the same thing. For edit part I have to use the same created sheet, validate the previous selection and make some new selection and move to the next sheet to validate the selection (check box labels). Please tell me the best possible approach with which I can reuse my modules?
And is it possible to declare list as a global variable?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to implement

Post by krstcs » Tue Nov 04, 2014 8:07 pm

First, there are many ways that are better than others, but without more information I couldn't tell you the "best". And even then it would be "best" from my opinion and view-point.

Second, you tell us almost nothing about your system under test, what technology it uses, what it looks like (a screenshot would do wonders), what Ranorex version you are using, etc., so it is almost impossible to give you a solution that would even work.

I would recommend that you read the Ranorex User Guide thoroughly. It explains everything that you are asking about in detail.

As far as module re-use, the approach I use and advocate is to make the modules as small as possible, preferably a single user-action and name them accordingly: Enter_UserName, Enter_Password, Click_OKButton, etc. Then you can just drag-and-drop them in the test cases/suites and everyone will know what they are doing.

Use variables that have consistent names (like $UserName and $Password) and name the data fields in your data set with the same names.

Use data-driven testing, which will allow you to run the same test over and over with different data while getting consistent and verifiable results. Use the data to feed and to validate the system.
Shortcuts usually aren't...