Posts

JMeter installation on Windows and Linux.

Image
Steps to Install JMeter Step 1) Install Java 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.  Download Java Platform (JDK) After installation is finished, you can use the following procedure to check whether Java JDK is installed successfully in your system In Window/Linux, go to  Terminal Enter command  java -version If the Java runtime environment is installed successfully, you will see the output as the figure below If nothing displays, please re-install Java SE runtime environment Please see the link for details instructions  https://www.guru99.com/install-java.html Step 2) Download Jmeter As of this writing, the latest version of JMeter is  Apache JMeter 4.2 . You can download it  here But this tutorial demos installation of version 2.9, the install process remains the same. Choose the Binaries file (ei...

JMeter and Jenkins configuration

Image
1. Load test configuration for HTTP request type sampler. Please follow the steps to create load test for HTTP requests. 1. Run JMeter on your system in GUI mode. You can simply run this by hitting "jmeter.bat" on windows and "sh jmeter.sh" from terminal on linux system. 2. Once opened, Give your Test Plan name. 3. Right click on Test Plan and Add-> Threads (Users)-> Thread Group Please use Thread Properties variable name as shown in above screen to configure on Jenkins and pass value while running your Job on Jenkins. (You'll have to make your Job as parametrized to take these values at run time) When You will run test on your local system then You can pass values as shown in below screen. Default value of these variable will be 1 if you don't pass+. - 4. Add CSV Data set Config to your Thread Group, If you have to take data from outside of your test at run time. 5. Add Once only Controller (Thread Group -> Add -> Logic C...

JUnit and TestNg

JUnit 4 and TestNG are both very popular unit test framework in Java. Both frameworks look very similar in functionality. Which one is better? Which unit test framework should I use in Java project? Here I did a feature comparison between JUnit 4 and TestNG. 1. Annotation Support The annotation supports are implemented in both JUnit 4 and TestNG look similar. Feature JUnit 4 TestNG test annotation @Test @Test run before all tests in this suite have run — @BeforeSuite run after all tests in this suite have run — @AfterSuite run before the test — @BeforeTest run after the test — @AfterTest run before the first test method that belongs to any of these groups is invoked — @BeforeGroups run after the last test method that belongs to any of these groups is invoked — @AfterGroups run before the first test method in the current class is invoked @BeforeClass @BeforeClass run after all the test methods in the current class have been run @AfterClass @AfterClass run before ea...