I am trying to execute jmeter with Robot Framework but getting attribute error when I tried to pass extra parameter. I tried below solution but it doesn't work.
How to pass values to the user defined variable in jmeter's jmx file via robot framework
Error:
robot TestCases/TC2_jmeter.robot
==============================================================================
TC2 jmeter
==============================================================================
Get_weather_info | FAIL |
AttributeError: module 'string' has no attribute 'split'
------------------------------------------------------------------------------
TC2 jmeter | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
Sounds like usage of a deprecated string function
If you're using this library then it supposed to work with Python 2.7, I think you should be able to still get it, or alternatively identify and re-write the problematic piece of the library, it's open source in any case.
In general you should not need any extra libraries, it's quite possible to kick off a JMeter test in non-GUI mode or generate a HTML Reporting Dashboard using subprocess module
Related
I am trying to execute a test from CMD but getting following error :
Command : jmeter -n -t D:\Users\load.test\Desktop\Performance\apache-jmeter-5.5\bin\UserServices.jmx -l D:\Users\load.test\Desktop\Performance\apache-jmeter-5.5\PerformanceData\MICR_Project\MICR_TestResults\DebugOOM\DebugOOM_1.csv -e -o D:\Users\load.test\Desktop\Performance\apache-jmeter-5.5\PerformanceData\MICR_Project\MICR_TestResults\DebugOOM\DebugOOM_1 -JURL=localhost -JPort=7058 -JUser=5 -JRampUp=1 -JDuration=900 -JRampUpSteps=1 -JOutputFileName=OutputOOM.jtl -JErrorFileName=ErrorOOM.jtl -JFlow1=100
What could be the possible reasons for this error as its not very informative.emphasized text
The NullPointerException is related to generating the HTML Reporting Dashboard, the dashboard generation fails because your test failed to execute at all - no Samplers were run.
The reason why no Samplers were run can be found in jmeter.log file, the most "popular" reasons are:
The number of threads in the Thread Group is 0
The test uses CSV Data Set Config for parameterization and the CSV file is not present.
The test uses a JMeter Plugin and the plugin is not installed
I have one project with Laravel 9 and I am performing testing with coverage report on it, The test cases successfully passed but I'm getting the below error, and if I remove --coverage-html tmp/coverage from command it's working fine. It means this error are occurring while generating a coverage report.
Please help me to figure out this issue.
Command:
XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-html tmp/coverage
Error:
Generating code coverage report in HTML format ... Cannot use object of type Illuminate\Support\Facades\Config as array
Note: I haven't written any new test cases it has only default two test files which come with the default laravel setup.
I running tests using PHPUnit 9 and when I do an assertRegExp I get a Warning
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.
How do I suppress the deprecation warning for the particular test?
Note: - I an using Laravel Dusk to run my test and I using the test helper assertPathIs.
From reading this blog post from the author of PHPUnit, there is no built in option to suppress these warnings:
PHPUnit reports a test that uses deprecated functionality with a warning because I know how developers use, or rather not use, PHP's E_DEPRECATED messages. ou cannot opt out of getting this information from PHPUnit.
This should not mark tests as failed with the default configuration:
By default, PHPUnit's command-line test runner exits with shell exit code 0 when the use of a deprecated feature is reported. This shell exit code is used to indicate that no error occurred. This information is used by continuous integration environments, for instance, to decide whether or not the build was successful. If you want your build to fail because the tests use deprecated functionality from PHPUnit, configure failOnWarning="true" in phpunit.xml. This instructs PHPUnit to exit with shell exit code 1 when deprecated assertions are used.
If you want to temporarily hide the deprecation warnings against the developers best wishes, comment out line 219 of vendor/bin/.phpunit/phpunit-9.5-0/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php. In case the file changes, the line to be commented reads: $this->displayDeprecations($groups, $configuration, $isFailingAtShutdown);
I had to set symphony env variable to hide these notices.
$ export SYMFONY_DEPRECATIONS_HELPER=weak
$ phpunit --debug --filter="testname"
I am facing an issue when I try to analyze Jmeter HTML report.
I use this command to run and create HTML report
jmeter -n -t C:\JMETER_RTB_REQUEST\Framework\Test_Fragment\Test_Fragment_15_02_2018_vol2.jmx -l C:\Users\bs\Desktop\Jmeter_reports\results_geo.csv -e -o C:\Users\bs\Desktop\Jmeter_reports\HTML
The problem is that when I am opening the Html file, under error section it not mention on which test (thread group) it failed, so I can not understand what test failed. In the CSV exists thread name column, but not in the HTML error section. Is their any solution?
[][Thread groups from test plan]
[][CSV report thread Name exists(HTML1 is thread name)]
[[HTML report not mentioned thread Name]]
Since JMeter 4.0, you can customize assertion message:
So you would put custom message assertion including Thread Name calling __threadNum function.
I have template which have two build steps:
Maven
Command line
Command line steps sets current datetime in variable which i want to use in Build Feature.
I am getting proper Current datetime as follows via Command Line step:
#!/bin/bash
export current_build_date_format="+%%d%%m%%Y_%%H%%M%%S"
export current_build_date="$(date $current_build_date_format)"
##teamcity[setParameter name='current_build_date' value='$current_build_date']
When i am trying to refer it in Build Feature, its not able to identify parameter via "%current_build_date%"
It shows paramter as undefined in Configuration Parameter section
Anything missing? I have defined that parameter via command line, how will teamcity features use that
Parameter error:
Error while reading user defined parameter first:
Initialization
[05:42:27][Initialization] - Build Details Validator
[05:42:27][ Build Details Validator] Error: Conversion = 'm'
[05:42:27][Initialization] Build validation failed
You need to echo TeamCity service message to let TeamCity parse and use it, e.g.:
echo "##teamcity[setParameter name='current_build_date' value='$current_build_date']"