what are the two types of execution that can be done in jmeter?
This was asked in a interview to me. i was asked what are the ways u execute the script i.e GUI or non -GUI. I am working on jmeter but I have never come across these two words
GUI means "graphical user interface", like you run in microsoft windows.
We can run Jmeter in both GUI or Non-GUI (From command line).
I strongly suggest you do some reading about Jmeter on below website
http://jmeter.apache.org/usermanual/index.html
http://developer.amd.com/community/blog/2009/03/31/using-apache-jmeter-in-non-gui-mode/
hope this will help.
It is absolutely not recommended to use JMeter GUI (graphical user interface) for anything apart from developing or debugging test as AWT Event Thread will kill both your test and JMeter in case of more or less high load.
There is a variety of approaches on how to run a JMeter test in non-GUI mode including:
command-line mode
Apache Ant task
Apache Maven plugin
Jenkins plugin
Execution pre-defined .jmx from Java code or creating a test on-the-fly
Plugins for IDEs like Eclipse or Idea
See 5 Ways To Launch a JMeter Test without Using the JMeter GUI for more details on above.
Related
I have a shell script deploying the utility jar file and starting the JMeter with the last test plan. Now I would like to close any existing JMeter IDEs before the deployment.
Ideally, the script should invoke the IDE's save menu before closing the GUI.
This will avoid losing any unsaved work.
Note
Killing the JMeter's process may not work in my use case.
I don't understand how this question is connected to JMeter.
It sounds like you're looking for a desktop automation tool like Appium, Taurus, Sikuli, LDTP, etc.
It might be the case that you "shell" script can also send "Save" signal to running JMeter instances and close them, however it depends on the operating system and "shell" type.
I am currently using JDK Flight Recorder with JDK 11 and came across some trouble in the CI/CD Plattform. Unfortunately, there is not too much documentation on the new Flight Recorder, but rather on the older one, which was still developed under Java.
When I try to start tests directly from the IDE, everything works fine and I get my recording files.
When I try to do the same thing, automatically, in the CI/CD Plattform, it causes time out and a lot of different indefinite failures, among them: trouble creating the file, the file is not even written, etc.
The JVM commands I used are the following (I put extra spaces for better readability):
-XX:+FlightRecorder
-XX:StartFlightRecording= name="UiTestServer", settings="profile", dumponexit=true, filename=""+System.getenv("CI_PROJECT_DIR") + "flightRecording/javaFlightRecorder.jfr"
The commands are the same that the IDE uses automatically, when starting the flight recording with right click on the specified test.
Does anybody know, whether the Flight Recorder has problems with such systems or specific services which might run parallely to it? I heard of some profiling tools, that are unable to perform on CI Plattforms.
If you need more detail, just ask me. Though, it might happen that I cannot tell anything related to the project.
Bit late as an answer, but JFR can definitely run in CI/CD environments. I have successfully attached JFR to our JMH microbenchmarks and published the results as artifacts in Atlassian Bamboo. Our Bamboo agents are running on AWS, so JFR itself should be good for most cloud environments.
JFR has been built to work in production systems, but if you want guarantees of low overhead (<1%), you should use the default settings, not profile.
'profile' is for a shorter period of time, i.e. 10 minutes, where it may be OK with additional overhead to gain more insight.
This is what I would recommend, for JDK 11 and later:
$ java -XX:StartFlightRecording:filename=/path
There is no need set dumponexit=true if a filename has been specified.
-XX:+FlightRecorder is only needed before JDK 8u40.
You can set a name if you like, but it's typically not needed. If you want to use jcmd and dump a recording, the name can be omitted.
Spark-shell can be used to interact with the distributed storage of data, then what is the essential difference between coding in spark-shell and uploading packaged sbt independent applications to the cluster operation?(I found a difference is sbt submit the job can be seen in the cluster management interface, and the shell can not) After all, sbt is very troublesome, and the shell is very convenient.
Thanks a lot!
Spark-shell gives you a bare console-like interface in which you can run your codes like individual commands. This can be very useful if you're still experimenting with the packages or debugging your code.
I found a difference is sbt submit the job can be seen in the cluster management interface, and the shell can not
Actually, spark shell also comes up in the job UI as "Spark-Shell" itself and you can monitor the jobs you are running through that.
Building spark applications using SBT gives you some organization in your development process, iterative compilation which is helpful in day-to-day development, and a lot of manual work can be avoided by this. If you have a constant set of things that you always run, you can simply run the same package again instead of going through the trouble of running the entire thing like commands. SBT does take some time getting used to if you are new to java style of development, but it can help maintain applications on the long run.
Is there any possibility to run written CUIT tests without necessity of having active browser window?
Basically, what I would like to have is just to run a bunch of tests on local machine. And I need to wait until all the tests are executed (each test requires browser window to be active during test run). But during this execution I can't use my machine for any other work - otherwise tests fall due to loosing control on the window. So is there any ability to run tests locally and work on the machine without any limitations simultaneously?
Coded UI Test Needs Active Browser while Execution.
To match your necessity you should try running test cases into virtual machine. That will not affect your work in local machine.
You might consider using WatiN and run them by "normal" MSTest/NUnit/whatever instead of using CodedUiTests. It does open up a browser window too, but allows you to interact with your desktop nevertheless.
That of course means rewriting your tests but as these tests are much more readable IMHO this might be worth it.
Running same Cucumber Features on different machines concurrently using parallel_tests gem
I'm trying to figure out how to use the parallel_tests gem to run the EXACT SAME Cucumber Features on a variety of different machines concurrently.
Currently I have them running on different machines but the SAME features do not execute, it just splits up the features and runs different features on different machines.
More clarification on what I want to do:
MACHINE 1 (Win 7) - EXECUTE SAME FEATURES CONCURRENTLY
MACHINE 2 (Win 8) - EXECUTE SAME FEATURES CONCURRENTLY
MACHINE 3 (Mac OS X) - EXECUTE SAME FEATURES CONCURRENTLY
...
Also my architecture is:
Cucumber -> Capybara -> Selenium Webdriver -> Selenium Grid
parallel_tests gem: https://github.com/grosser/parallel_tests
The parallel_tests gem is really purposed to parallellism, not executing multiple platforms.
You may find the following useful:
Sauce Gem 30 rake tasks
"The Sauce integration is currently targeted at RSpec and Cucumber, running on a local server you can spin up multiple copies of. It runs a copy of each test for each platform, and divides them up across all the concurrency available to your Sauce Labs account by default"
Hope it helps, I haven't used it myself yet.
Thanks for the clarification. To accomplish testing your app for all the supported environments (OSs/browsers) you can use something as Selenium Grid here is an example Selenium RC: Run tests in multiple browsers automatically.
TestingBot is a service that use this: http://blog.testingbot.com/2012/02/19/selenium-cucumber-capybara
Other approach is described here: http://altoros.github.io/2013/running-capybara-tests-in-remote-browsers/
http://paauspaani.blogspot.mx/2013/05/running-tests-remotely-using-selenium.html
There is also a presentation: http://www.slideshare.net/martinkleppmann/crossbrowser-testing-in-the-real-world
Also this could help you Has anyone figured out a way to run the same cucumber scenario on multiple browsers/web drivers?
Hopefully this will give you some clues.
I am confused by this statement of yours:
Currently I have them running on different machines but the SAME
features do not execute, it just splits up the features and runs
different features on different machines.
parallel_tests is used for splitting up tests and running them on multiple cores, not on a distributed environment of multiple machines. It can group tests to be run on a distributed environment using the --only-group flag, but it doesn't actually run tests on a distributed environment. So you have to do some lifting yourself to get the tests running on a distributed environment. You could run all of your tests on multiple machines like so:
Use net-ssh to ssh into each one of your boxes.
Use each ssh session to run your parallel_tests script (which should break the tests up and run them in parallel on the current box -- just don't use the --only-group option as described here)