LoadRunner Controller XML File - Basic Scheduling mode - windows

I want to create a LoadRunner scenario using XML file that I can execute through CLIControllerApp.exe and possibly in the Jenkins Pipeline. I found the XML structure here https://admhelp.microfocus.com/lr/en/12.60-12.63/help/WebHelp/Content/Controller/scenario-run-cli.htmis. My question is how to write a scheduler with Run Mode = Basic. The documentation says the tag should have <Data> and then a <Duration> tag with a positive integer value. In my case, I would like to run the VuGen script until it is complete just once. What should I write in the <Scheduler><Data><Duration> tag?
Thanks.

Related

Any option to change the name of the file which is on disk during runtime to execute upload functionality in Jmeter

I have a scenario where one of the test REST API returns a transaction_Id, this transaction Id I need to pass in my next request(API Request), also upload the file as well. This upload file has name format like ${transaction_Id}_1_1_bkg.raw,without correct format backend server may not be able to analyze the data.
Since I have to run a load test, these transaction Ids will generate at run time and the same I have to change the file name and upload it as well.
Did any one had face this challenge before in Jmeter to change the file name at run time and upload it, if yes, what was the solution.
Thanks,
Akshat
You could copy the file to a new one with the desired name using JSR223 PreProcessor like
org.apache.commons.io.FileUtils.copyFile(new File('template_bkg.raw'), new File(vars.get('transaction_Id') + '_1_1_bkg.raw'))
where vars stands for JMeterVariables class instance, see the JavaDoc for more information on all existing functions and Top 8 JMeter Java Classes You Should Be Using with Groovy article to learn more about JMeter API shorthands available for the JSR223 Test Elements.
Once upload is finished you can delete the file using JSR223 PostProcessor

Unable to fetch BasicReport.htm_source.xml in Openscript Test Result folder after execution

I'm trying to create a custom HTML report out of BasicReport.htm_source.xml in the Test Result folder.
I'm not able to access the xml file during script execution. Eventhough I used the XML rendering function in the finish() node.
Is their anyway I can use the BasicReport.htm_source.xml after script execution?
finish section is still execution, in short no way to do this.
if an Oracle customer, use official channel to create ER

Jmeter reports for functional testing

I am using Jmeter for functional testing and not just for load testing.
All the examples that I see for reports are for load testing, and I do not see how it is effective for functional, I do not care speed of response latency and so on.
I care about sampler response, is http get 200 OK, is the assertion succeed or not
the response message that I write, the JDBC response with my response message.
Is their a way to use Jmeter reports to see al that?
I have a test plan with 50 tests, is their any example of how it should look like in reports?
Once again not care for this test from performance or load at all, just functional, Is their any guide since all the info I see its about performance and not functional
You should look into Jmeter+ant integration. You can run .jmx files using Ant and generate HTML report. The HTML report gives the success and failure rate and response message as well.
Steps to run JMeter .jmx with Ant:
Install Apache Ant and the installation should be in your path.
Copy your .jmx file into your apache JMeter's /extras folder and replace existing Test.jmx file your own.
Type the command ant.
Ant will generate the .jtl and .html file with the same name as your .jmx file.
If you want to run the tests using continuous integration and Jenkins. Please follow the below nice blog.
http://www.testautomationguru.com/jmeter-continuous-performance-testing-part1/
You should check the
for example for each listener you can click Configure and choose Save Configuration, in your case you can check only
Save Success - if it succeeded or failed
Save Field Names (CSV) - header line
Save Label - to know which request succeeded or failed
if no checkbox is checked you will get an empty lines for each sampler
You will get results as
label,success
HTTP Request,true
HTTP Request,true
HTTP Request2,false
HTTP Request2,false
You can precisely control what is being saved into .jtl results file by using dedicated JMeter Properties which names start from jmeter.save.saveservice
Example configuration will look like
jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.response_data=true
jmeter.save.saveservice.response_data.on_error=true
jmeter.save.saveservice.bytes=true
#etc.
This way you will get a .jtl results file in .XML format which can be examined using View Results Tree listener.
You can also view this .jtl file directly in browser, however you will need to add one line to it in order to specify the desired XSL stylesheet to it like:
<?xml-stylesheet type="text/xsl" href="C:\apache-jmeter-3.3\extras\jmeter-results-report_21.xsl"?>
More information: Visualizing JMeter .jtl Files Viewed as An .xsl Stylesheet

Get XML Reports in TeamCity from Google Test

I am trying to figure out how to run unit tests, using Google Test, and send the results to TeamCity.
I have run my tests, and output the results to an xml, using a command-line argument --gtest_output="xml:test_results.xml".
I am trying to get this xml to be read in TeamCity. I don't see how I can get XML Reports passed to TeamCity during build/run...
Except through XML report Processing:
I added XML Report Processing, added Google Test, then...
it asks me to specify monitoring rules, and I added the path to the xml file... I don't understand what monitoring rules are, or how to create them...
[Still, I can see nowhere in the generated xml, the fact that it intends to talk to TeamCity...]
In the log, I have:
Google Test report watcher
[13:06:03][Google Test report watcher] No reports found for paths:
[13:06:03][Google Test report watcher] C:\path\test_results.xml
[13:06:03]Publishing internal artifacts
And, of course, no report results.
Can anyone please direct me to a proper way to import the xml test results file into TeamCity ? Thank you so much !
Edit: is it possible that XML Report Processing only processes reports that were created during build ? (which Google Test doesn't do?) And is ignoring the previously generated reports, as "out of date", while simply saying that it can't find them - or are in the wrong format, or... however I should read the message above ?
I found a bug report that shows that xml reports that are not generated during the build are ignored, making a newbie like me believe that they may not be generated correctly.
Two simple solutions:
1) Create a post build script
2) Add a build step that calls the command line executable with the command-line argument. Example:
Add build step
Add build feature - XML report processing
I had similar problems getting it to work. This is how I got it working.
When you call your google test executable from the command line, prepend %teamcity.build.checkoutDir% to the name of your xml file to set the path to it like this:
--gtest_output=xml:%teamcity.build.checkoutDir%test_results.xml
Then when configuring your additional build features on the build steps page, add this line to your monitoring rules:
%teamcity.build.checkoutDir%test_results.xml
Now the paths match and are in the build directory.

Jmeter xpath extractor

Hi
I am new to JMeter. I was trying to extract the response values from the response xml and store it back in a csv file or an excel file. I am not able to do so.
Can someone help me out on this matter.
You'll need to create a Beanshell script to this, as Jmeter doesn't naively have this functionality.
I had come across similar scenario and my suggestion would be to write a SAX parser in pure java and add it as jar in Jmeter lib folder.
A Bean Shell Post processor can be used to import this jar and pass the response xml to the parsing method. Good Luck

Resources