Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Less script maintenance by using suites instead of scripts for building your tests so you can use 'includes'

View previous topic View next topic Go down

Less script maintenance by using suites instead of scripts for building your tests so you can use 'includes'

Post by Lampie1973 on Tue Jan 31, 2012 7:50 pm

I have been working for more than a year now with Selenium IDE and noticed that the maintenance on the scripts can become high when screens changes etc. Next to that I have seen that the quality of your scripts improves over time which means you constantly have to go back to older scripts and also improve them 1 by 1.

To solve this problem I have come up with a complete new way of working. In the Selenium core this was already possible because you have the include statements but these are not available in the IDE. I wanted to make it possible for less experienced Selenium users to still built scripts from small blocks. This way it should become possible to built test scripts faster and of better quality.

My solution to the problem:
1 - built small test scripts which contain the base blocks that you need to do something (login, click on ok button, select account etc.). Most scripts will only contain 1 command but some will have a few commands. (important note is that the script should start with a comment which is the script name so you can find it back later).
2 - built a suite file and add the blocks that you created (basically this script will have all the steps needed to complete the full test)
3 - convert the suite file into a test script so it can be run by the default tools.

I built a small Excel Macro to do this for me but you can probably do this in any other programming language you want. I like Excel because almost everybody has it available on his PC. The program will read the Suite file, find the scripts that it refers to, read the scripts and finally creates 1 full script out of them. The new script will have the same file as the original suite but it will be on a different location (this to avoid confusion and perhaps overriding the suite files which you don't want).

Advantages:
- the basic blocks that you built will always have the same quality
- If a screen changes somewhere than you will only have to change the block(s) that are interacting with that screen. After that you convert all the suites to scripts again and the new scripts will automatically contain the changed block(s).
- It is very easy to add a step to a block so that all scripts will start using that step after the rebuilt.


At this point I am still experimenting with it but I notice that it really works. I can built new script within 10 minutes without too much trouble just by creating a new suite and start adding the basic scripts. 1 press of the button and all the suites will be transformed into scripts. another press on the button and they are running.

Did anybody else already found this way of working? Or perhaps even a better way of being more flexible using the Selenium IDE? What I am doing is a bit against the basic logic of Selenium because they only use the suites for running the test scripts. I am now 'abusing' the suites a bit but must say it does work and does allow a lot of flexibility Smile

I am curious about any reactions/ suggestions.

Cheers,
Erwin

Lampie1973

Posts : 1
Join date : 2012-01-31

Back to top Go down

Re: Less script maintenance by using suites instead of scripts for building your tests so you can use 'includes'

Post by freesky on Mon Feb 13, 2012 11:21 am

Thanks for sharing. Could u post the detail, such as excel content, source code etc? Thanks.

freesky
Amateur
Amateur

Posts : 72
Join date : 2011-04-13

Back to top Go down

Re: Less script maintenance by using suites instead of scripts for building your tests so you can use 'includes'

Post by Sanjay S on Thu Feb 23, 2012 12:03 pm

Awesome Smile

Sanjay S
Regular Participant
Regular Participant

Posts : 34
Join date : 2012-02-10
Age : 29
Location : Chennai

Back to top Go down

Re: Less script maintenance by using suites instead of scripts for building your tests so you can use 'includes'

Post by Sponsored content Today at 1:02 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum