Can anyone please suggust me to solve this issue?
The error your are getting:
Don't use GUI mode for load testing !, only for Test creation and Test debugging. For load testing, use CLI Mode (was NON GUI): jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder] & increase Java Heap to meet your test requirements: Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file Check : jmeter.apache.org/usermanual/best-practices.html
An error occurred: Could not initialize class sun.font.SunFontManager errorlevel=1
The first part of the message is a notification. It suggests that you should use the CLI mode instead of the GUI mode for load testing. You can use the following command to run JMeter in CLI mode:
jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
Make sure to replace the placeholders with the actual values of your JMX file, results file, and web report folder path.
It also suggests that there might be an issue with the Java Heap settings. You may need to increase the Java Heap to meet your test requirements. You can modify the current environment variable HEAP in the jmeter batch file to do this. You can set the HEAP variable to
"-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" to allocate 1GB of memory to JMeter. You can find more information on how to modify the HEAP variable in the JMeter documentation.
The actual error message
"Could not initialize class sun.font.SunFontManager" could be due to a missing font library in your system. You can try installing the missing font library to resolve this issue. Alternatively, you can disable the font checking in JMeter by adding the following line to the
This will set the font family to Dialog and disable the font checking.
I hope these suggestions help you resolve the issue you are facing with JMeter. If you still face any issues, feel free to reach out to me for further assistance.
- JMeter documentation: https://jmeter.apache.org/usermanual/
- JMeter CLI mode: https://jmeter.apache.org/usermanual/get-started.html#non_gui
- Modifying HEAP variable: https://jmeter.apache.org/usermanual/best-practices.html#modifying_heap_size
- Disabling font checking: https://jmeter.apache.org/usermanual/hints_and_tips.html#fonts