Search This Blog

Wednesday, May 28, 2014

Specification Based Tests-Concordion

Concordion is Specification based tool having following benefits : -

  • Specifications are specified in plane HTML language by business analysts
  • Developers takes the HTML file and instrument(Adding few specific attributes) to it
  • Specific Java fixture class prepared to process the instrumented HTML file
  • Outputs produced as a result of test run having the pass fail result whose design driven by CSS sheet
 (1)Adding Specifications : -



(2) Instrumenting the HTML file : -









 (3) Defining Fixture Class to Drive the Specification : -



HelloWorldTest.java file is called because the 'getGreeting()' has been defined within this file and it returns the Same Verbiage i.e 'Hello World!'.

HTML output -PASS Condition








 HTML output -FAIL Condition

Failure observed when there is a mismatch in wording returned from java fixture class and wording speified in HTML file.So if we change the HTML wording to say 'Hello World' .



Now lets see the Failed output HTML report : -



As noticed its failure reporting is user friendly and design driven by CSS sheet.
I hope you enjoyed the post :)

Tuesday, May 27, 2014

Selenium IDE Recipe-RollUp Rules

RollUp rules are nothing but set of commands which are used to reduces repeatation of few set of commands.

For Eg: -

There are 2  testcases : -

1. Login to IRCTC and Check seat availability and Logout
2. Login to IRCTC and Check refund status of cancelled ticket and Logout

In the above two testcases, "LOGIN TO IRCTC" is common which is a combination of following steps : -

-Navigate to IRCTC url
-Type Login user name
-Type Login password
-Hit Login

Hence this set of teststeps/commands can ben grouped in to a single rollup rule.


Lets Start The Recipe

Here i have recorded the whole script of logging into to irctc and logging out of irctc.it looks something like below : -





 Now Till the 4th command i.e clickAndWait,a roll up can be formed.




 In order to form a rollup we have to import an userextension file which is available for download here.

Now once it has been downloaded we have edit the file to put command.I have did the same job and you can see the modified version of it here : -
 
 Now  Once it has been created, you can import it into IDE from Options>Options > Selenium Core Extensions

Now lets look at out modified IDE script below : -




 Again, If we want to explore what commands it has, We can highlight the rollup command and look at rollup tab.





 Thanks.I hope you enjoyed the post :)