Tuesday, June 16, 2020

The BlazeMeter Chrome Extension : Record JMeter, Selenium, or Synchronized JMeter and Selenium

The BlazeMeter Chrome Extension:

The BlazeMeter chrome extension is a free tool that enables you to Record, Browse, Upload, and Run your testing scripts. The Chrome Extension supports recording JMX, JSON or YML files, for running in JMeter, Taurus or BlazeMeter as well as both JMeter and Selenium scripts, automatically and simultaneously.


Running Your JMeter and Selenium Script in BlazeMeter:

The new BlazeMeter Chrome extension records all of the HTTP/S requests that your browser sends, creates a JMeter or Selenium script, and uploads it to Blazemeter, where you can execute it with a single click.

In other words, you can run a JMeter and Selenium without even having them installed. There is no need to install JMeter or Selenium to record or run a performance test; the Chrome extension creates the script on its own.

Running Your JMeter and Selenium Script Locally:

On the other hand, if you have JMeter installed, you can convert your recording into a JMeter JMX file or Taurus YAML file, then edit or run it via your browser or on your local computer.  

Note: The extension needs to be able to communicate with blazemeter.com in order for the recording to be converted into a script.

Using the BlazeMeter Chrome Extension:

1. Add Blazemeter Chrome Extension on your local computer

2. Record your actions, then play them back as a script

How to Add Blazemeter Chrome Extension on your local computer

1. Open chrome browser, Click on chrome Apps




2. Click on web-store which is in Right-bottom


3. Search Blazemeter and click on Add extension




4. Now you can Login and see blazemeter on your chrome 



How to Record your actions, then play them back as a script

1.  Provide test name and click on recording button. And type website name whatever you want to test.


2. Save .jmx file on your local machine



3. Open Jmeter


4. Now, you can open your saved .jmx file in Jmeter 


5. Here you can see all http request and execute your performance testing and load testing


For more information you can follow below link :) 

Wednesday, May 20, 2020

How to install Jmeter in Window 10 ?

JMeter is a pure Java application and should run correctly on any system that has a compatible Java implementation.

Before installing Jmeter, we need to do some work.

1. First check your java version in command prompt by typing below command 

       java -version

2. If you don't have java in your system, you have to download java JDK

Because JMeter is pure Java desktop application, it requires a fully compliant JVM 6 or higher. You can download and install the latest version of Java SE Development Kit.

As of 20th May 2020, Java SE 14.0.1 is the latest release for the Java SE Platform


Do's

  • Install Java by right click and Run as administrator

  • Open CMD (command prompt)
  • Run the command javac to check java is installed properly

  • Run the command java -version to check the version


  • Unzip the file
  • Go to folder ..\apache-jmeter-5.3\bin
  • Click on Jmeter.bat


  • Jmeter is ready

Dont's

  • Do not install jdk without RIght Click Run as Administrator
  • Java will not properly installed
  • Jmeter will not work


Screenshot in Selenium

How to capture Screenshot in Selenium Web-driver (C#)

OVERVIEW

Selenium Web-Driver provides the capability to capture screenshots during a test execution. This ability is really important when you need to investigate different failures that occurred during the execution or in some cases to track the different stages of the run.

The capability to take a screenshot with selenium is extracted from the "ITakesScreenshot" interface that allowing us to take a screenshot of the current page displayed in the driver instance.

Taking screenshot of the entire screen (All Elements)

In the following test, we will log into a web-page and take screenshot of the entire page in .JPEG format. We can create screenshot class in common driver and can use in entire project. 

#region screenshots
        // Create a class of screenshot in common driver
        public class SaveScreenShotClass
        {
            public static string SaveScreenshot(IWebDriver driver, string ScreenShotFileName) // Definition
            {
               // Determines where do you going to save the screenshot

                var folderLocation = YourfolderLocation.ScreenshotPath;

                if (!System.IO.Directory.Exists(folderLocation))
                {
                    System.IO.Directory.CreateDirectory(folderLocation);
                }
                // This method will take the screenshot

                var screenShot = ((ITakesScreenshot)driver).GetScreenshot();

                var fileName = new StringBuilder(folderLocation);

                fileName.Append(ScreenShotFileName); // Determine the picture name

                //fileName.Append(DateTime.Now.ToString("_dd-MM-yyyy_mss"));  // Determine the                              picture name with date formate

                fileName.Append(DateTime.Now.ToString("dd-mm-yyyy_mss"));

                fileName.Append(".jpeg");  // Determine the format of the picture

                screenShot.SaveAsFile(fileName.ToString(), ScreenshotImageFormat.Jpeg); //

                return fileName.ToString();
            }
        }

        #endregion

     // Now we can use screenshot method in all project with the help of below code

    SaveScreenShotClass.SaveScreenshot(driver, "PictureName");

Featured Posts