Wednesday, December 18, 2019

Copying a file from one machine to another machine using JMeter



You want to copy a file which is available in your machine to another machine (even shared drive). You can follow the below steps.

Step 1: Add JSR223 sampler in your thread group.
Step 2: Select Language as “groovy (Groovy 2.4.16 / Groovy Scripting Engine 2.0)”. Under Script, please paste this code.
def sourceFile = new File('<Source file full path including filename and extension>')
def destinationFile = new File(‘<Destination file full path including filename and extension>')
destinationFile << sourceFile.text

Before running the script, the destination folder looks like below.
Execute the script in Jmeter
After running the script, the destination folder looks like below.

Simple 😃. Isn't??

Linux Series - SED Utility/Package - 4. Deleting Lines

Let’s explore sed’s explicit delete command, which you specify by using the option 'd'. Again, we are using the sample file named &#...