Thursday, February 13, 2014

Load test with Jmeter & Unique email

Some days ago i have been assigned to do a load testing. 
That page have a form, and I have to provide UNIQUE email address each time i submit the form.
So i started to look into the net and with the QA team how can i generate a unique ID and append to an email prefix to make the address unique. 
There are many ways to make it unique, but the best solution i have found is UUID (Universally unique identifier), If you want you can read more about it. 
There is tiny chance that it will be duplicate, actually frankly saying there is none. 

Here is the code for it: 
${__BeanShell(UUID.randomUUID().toString(),email_id)}@test.com
I used a "Response Assertion" which confirm us that we have gone to the nest page after the successful submission

BeanShell Sampler to print the result in console to see the generated and submitted email id's.


How the console shows the UUID:



Special thanks to one of my colleague Masud Parvez, who really help me lot building this script.

Monday, May 27, 2013

Selenium IDE & CKEditor recording problem

Its been so long and today i planed to write about a problem and a solution i have faced while i try to record with Selenium IDE and CKEditor.

Problem: 
While recording with selenium IDE it can't record the CKEditor text that was written inside the CKEditor text field.

Solution:
Adding these three line will let the Selenium IDE type into the text box.

Here is the table for the IDE:

focus | class=cke_editable cke_editable_themed cke_contents_ltr
typeKeys | class=cke_editable cke_editable_themed cke_contents_ltr | Automated test text from Selenium IDE
runScript | CKEDITOR.instances["edit-body-und-0-value"].setData('Automated test text from Selenium IDE ');



focus | class=cke_editable cke_editable_themed cke_contents_ltr
This is the class of the CKEditor (please see the screenshot below to know how to find the class of CKEditor by using firebug)

Use firebug to know the class of CKEditor
  • typeKeys | class=cke_editable cke_editable_themed cke_contents_ltr | Automated test text from Selenium IDE


  • typeKeys will focus the CKEditor text field. Here the class is the same class used above. And the text after the class will be written inside the text field of CKEditor.



    runScript | CKEDITOR.instances["edit-body-und-0-value"].setData('Automated test text from Selenium IDE ');

    runScript will run the script that will write inside the text field of the CKEditor. 

    This is the screenshot of IDE if you need more help please let me know. 

    Selenium IDE - CKEditor code

    Thursday, June 3, 2010

    The learned lesson

    I am testing different web application for a long time but started testing flex application for few months and it is so interesting. But the main blocker is the poor knowledge of advance new flex application and the back end technology that used for application that i am testing. So there is lot of opportunity to overlooked something and when i am onto something fishy i missed the over all big picture. 

    Most of the time i am testing with Firefox because that support the flex debugger so that if any exception occurs i can trace it out. And thats the major mistake i have made that i make myself comfortable on Firefox and make it as a habit of my testing. 

    I have to say each and every testers should use the IE as a default browser and first they have to know the customer configuration which IE there use mostly. I think preferable is IE 6 And 7 that is most of the people now a days use. 

    Here is the browser Stats below:

    Browser Statistics Month by Month

    2010IE8IE7IE6FirefoxChromeSafariOpera
    May16.0%9.1%7.1%46.9%14.5%3.5%2.2%
    April16.2%9.3%7.9%46.4%13.6%3.7%2.2%
    March15.3%10.7%8.9%46.2%12.3%3.7%2.2%
    February14.7%11.0%9.6%46.5%11.6%3.8%2.1%
    January14.3%11.7%10.2%46.3%10.8%3.7%2.2%
            
    2009IE8IE7IE6FirefoxChromeSafariOpera
    December13.5%12.8%10.9%46.4%9.8%3.6%2.3%
    November13.3%13.3%11.1%47.0%8.5%3.8%2.3%
    October12.8%14.1%10.6%47.5%8.0%3.8%2.3%
    September12.2%15.3%12.1%46.6%7.1%3.6%2.2%
    August10.6%15.1%13.6%47.4%7.0%3.3%2.1%
    July9.1%15.9%14.4%47.9%6.5%3.3%2.1%
    June7.1%18.7%14.9%47.3%6.0%3.1%2.1%
    May5.2%21.3%14.5%47.7%5.5%3.0%2.2%
    April3.5%23.2%15.4%47.1%4.9%3.0%2.2%
    March1.4%24.9%17.0%46.5%4.2%3.1%2.3%
    February0.8%25.4%17.4%46.4%4.0%3.0%2.2%
    January0.6%25.7%18.5%45.5%3.9%3.0%2.3%
            

    I will discuses about the production deployment process soon. Keep in touch and enjoy your testing.