Convert QTP scripts to Selenium Web Driver

Converting your test scripts from one test automation tool to another is not difficult.

Migrating from Selenium RC to Selenium Web Driver is easy if your test scripts are re-factored and use the page object model.

Migrating from QTP to Selenium Web Driver is also not very complicated as explained by Tarun Lalwani (QTP expert and author of QuickTest Professional Unplugged) in this Sauce Labs webinar.

There are multiple benefits of going through this conversion, most notable being:

- faster execution time (90% faster Selenium scripts in the case study)

- no language dependency

- cheaper test automation environment

- cloud services available (Sauce Labs)

- free tool

- more browsers supported


JMETER - change the server name of the request dynamically

Problem


Tell me, please, what and in what way I should use logic controllers to solve the task (for example):- make 16 requests so that first 3 of them reach one host and each 4-th request is sent to another host (e.g. 3 - first.com; 1 - second.com; 3 - first.com; 1 - second.com and so on). 




Solution

1. add the thread group to the plan with 4 users



2. Add 1 user defined variable called index
Set the default value to 1.




3. Add a while controller

Set the condition to the controller so that it iterates while index < 5.




4. Add 1 HTTP sampler

Leave all fields empty.
The server name (domain) will be set in a BeanShell pre-processor.





5. Add a BeanShell pre-processor

It runs before the HTTP sampler runs and sets the server name of the HTTP sampler based on the value of the index variable.

The index value is increased after the domain name is set





6. Add a View Results Tree listener



7. Enable the log and run the load test

You will see 16 requests in the listener (4 users x 4 requests per user) and 16 domains in the log (12 for www.aaa.com and 4 for www.bbb.com)



2014 in retrospect

Summary of my testing initiatives in 2014:





  • worked on less popular types of testing: 

  • blogged more in this site

  • created a few articles for the uTest.com blog:

  • learned lots of new things about
    • database development (ETL, stored procedures, fine tuning, database cubes)
    • create BI reports with Tableau
    • Android test automation with the UI Automator framework
    • Ruby basics
    • source control with Subversive

  • improved a lot the T-SQL skills

  • improved WebDriver and Java knowledge

  • improved unit testing with JUNIT knowledge

  • voted as outstanding uTest university instructor (2014 - Q3)