Auto Scale Selenium Hub with Zalenium

Selenium-Hub Autoscale Issue —

  • – Selenium Grid is resource consuming & Not container based.
  • – Running multiple test creates issue with scaling or increased Test Cases.
  • – Can’t auto scale.
  • – Scaling with docker alone with cloud testing provider.

Zalenium : –
A flexible and scalable container based Selenium Grid with video recording, live preview, basic auth & dashboard.

1,873 total views, 3 views today

 

Testing Techniques -Pairwise Testing using Pairwiser Tool

Today I am going to discuss Testing Techniques- Pairwise Testing.  “Generate less number of combination with more test coverage.

What is Pairwise Technique?

  • A black-box test design technique in which test cases are designed to execute all possible discrete combinations of each pair of input parameters
  • Pairwise testing technique can dramatically reduce the number of combinations to be covered but remains very effective in terms of fault detection

Now let’s learn how to apply Pairwise Testing by this example.

Let’s take an example –
Suppose, we have a web app with one page that we have to do the Cross browser testing (CBT) e.g for IE, Chrome, Firefox, Opera, Safari and Cross OS testing with Windows, Mac, Ubuntu. We have another parameter like HTTP 1, HTTP 2 and resolution HD, NonHD(low resolution).

So Normal combination  – 5*3*2*2 = 60
To perform 60 Test cases we will need about  180 minutes(assuming 3 minutes per Test Case).

Let’s take this example in the Pairwise Testing.

We will use the Pairwiser-tool for combination to generate.

Need for Pairwiser tool

  1. Web-based easy to use.
  2. Generate the combination and export to excel.
  3. Generate the Test case and export to JIRA directly.
  4. You can apply the constraint to the input parameter.

Input in the Pairwiser Tool

  • Input 1 – CBT  : IE, Chrome , Firefox , Safari , Opera
  • Input 2 – Cross OS: Windows, Mac OSX, Ubuntu
  • Input 3 – Protocol : HTTP1 , HTTP2
  • Input 4 – Resolution:  HD, NonHD

Create a New Test Plan in – https://inductive.no/pairwiser-tool/

Create Test PLAN

Added input Parameters and Constraints

More IE – Constraints

Navigate to Generate Test Case – Only 15 Test Cases  \m/ 🙂

Time in Test Cases Now

Test Cases  = 15
Time per Test  = 3 minutes

Total  Time  = 45 Minutes only before it was 3 hour

Lets Analysis the coverage, the Results

Test Cases Generation – Template

Test Cases – Copy to JIRA or Excel

That’s All Folks

In the Form of Slides

 

 

API testing using Postman – Part 1

This is series of the  API Testing using postman First

 

Step by Step Selenium With Python – Part 1

In this series, We going to learn about the create a Test Suite in the Python. Let’s not waste much of the time lets start as quickly as possible.


Things you know before.

1. Selenium – Testing Framework
2. Python – Basic Python Syntax. – Please install it before proceeding.
3. Brain 😛

About Selenium :

Running selenium server

If you have no clue what is selenium is,Read about Selenium in my other tutorials or you can have a look here for the more http://www.seleniumhq.org, Just for the quick reference, Selenium is Automation framework written in the java that allows you to automate the web application with the different languages support e.g Python,Javascript, Java, Ruby.You can write functional/acceptance tests using Selenium WebDriver.

 

Installing Python bindings for Selenium

Running selenium serverGo to Command prompt or Terminal in the Mac and Type.
Make sure pip is installed on your system.(If not you can install it using this link here)

It will install the python binding for the selenium  to your system.

Step 1 : Running Selenium Server and Install Python Selenium bindings

Let’s run the Selenium Server that listens to our command/Test cases written python and execute them in the browser. Make sure java is installed on your system and its available in the path. If not follow this tutorial. And set up to path here
Download – Selenium server here.

You will see something like this on the command line.

Running selenium server

Selenium Server is up and Running.

Step 2 : Creating a Basic Test in the Selenium with Python and Run it.

Create a File in the Pycharm ( Python Editor) e.g I have made a Folder structure for the upcoming  tutorials also. So This part is Part 1 and I have one file HelloWorld.py that will have the code for the First Test case in python.

In the File, we are going

1. Import the selenium web driver.
2. Create a driver object from FirefoxDriver Class and Open the Borwser.
3. Use get method to go to the URL.
4. Assert the title and Close the Brower.

Run the Test by

File run using python:

Python test running using Pycharm

Python test running using Pycharm

So we have successfully run our first Test, Let’s move to the other Tutorial in the Next Part2.
Hope to see you guys in the next part.