I am trying to develop a java application which uses jmeter's maven library artifactId: ApacheJMeter_http to load test.
My application does distributed remote tests, and i want to execute some java code after the test finishes execution. Upon reviewing the JMeter docs, I found out that tearDown Thread Group can do the job. In the JMeter GUI, you can simply add this type of Thread Group, but I can't find the equivalent java class in JMeter's library.
Moreover, I am still not sure how to execute java code even after i manage to add this thread group to my test tree.
EDIT:
Found the answer to part 1 of my question. tearDown Thread Groups are named PostThreadGroup by jmeter.
Still not sure how to execute java code using a PostThreadGroup. Basically I want to call a hook after the execution of a test.
If you need to determine the class for this or that JMeter test component:
Open logger panel by clicking yellow triangle with exclamation sign in the top-right corner of JMeter GUI
Having highlighted the test component choose Help -> What's this node
The element class and GUI class will be displayed in the jmeter.log
The class you need is PostThreadGroup, see the JavaDoc for all possible methods/fields/whatever.
More information: How to Debug your Apache JMeter Script
Related
I've written a Java Agent in IBM Domino Designer, but I don't know how to run it. Whenever I click "Run Agent" pretty much nothing happens, it only says that
Started running agent 'unzipFiles|unzipFiles' on 08.11.2017 10:45:21
Found 0 document(s) that match search criteria
Ran Java Agent Class
Done running agent 'unzipFiles|unzipFiles' on 08.11.2017 10:45:23
But when I go directly into the class and click Run As -> Java Applciation everything works fine. What's the problem? It seems to me, that it even doesn't go to the JavaAgent class and invoke main method. I've tried to put Thread.sleep(99999) method, but the time of "execution" of this agent is the same - 2 seconds. How can I solve it?
The agent properties
Is there any way to debug it?
A Domino agent is not a java application. You don't need to implement the method 'main' but 'NotesMain'. And the agent class must extend lotus.domino.AgentBase.
If you create a new agent from scratch Domino Designer gives you all the boiler plate code. Just start from the line
//Your code goes here
The scenario is as follow:
I want to pause the test when it encounters the Button in the Wiki page Test Scenario. It should wait until the user presses the Button and once the button is pressed the test should continue.
As the automated tests are designed to run in a full set without any monitoring or midway user interaction, this is not a standard feature. Feel free to edit the source where needed and recompile.
Since you tagged this question with Selenium-fitnesse-bridge, my assumption is that you are testing the browser user interface of an application via Selenium webDriver, but instead of driving the tests from xUnit you are driving from fitnesse.
First, this isn't really the sweet spot of fitnesse - it's main purpose is to test business logic by interacting with System Under Test as opposed to running end-end tests by driving a browser - however, that soap box aside, you are creating fixtures for fitnesse to interact with - and those fixtures currently contain webdriver code. So you can put the pause inside your fixture class. I'd need to see your test table and whether you are using Slim or not to get an idea of where the logical place in your fixture code to place the wait would be.
The only problem with that solution is if you want to specify on the fixture page that there should be a wait at a certain point - you don't just want it behind the scenes in the webdriver code. In that case, you could probably use a ScriptTable style of fixture (http://www.fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ScriptTable) and have a command in the script that maps to a method that waits for the specified amount of time or for a specified element to be visible.
I run my test using Java, Selenium and TestNG.
When I execute my test suite I have it set up where the testng.xml has all the configurations to run my tests. I am wondering, if I can set up my own custom UI component that does the same thing as the xml?
I am asking because I have nontechnical people in my staff and I don't want them to have to download an IDE, check out the project, etc. I want to create some UI where they can just go there and hit a button and the tests runs just like how I can right click on the testng.xml and hit run.
You could use a build tool like Jenkins: https://jenkins.io/. This would allow other users to visit a webpage to run the tests instead of using an IDE - as long as they don't need to modify testng.xml.
I have an existing set of QTP regression tests that I wrote and have executed through several regression test cycles successfully. I have a JavaWindow that contains several JavaTables where I parse the table data into an array and verify it against the expected results in Excel spreadsheets.
In the current test cycle, the JavaWindow (which contained the JavaTables that I could read and verify) has now changed to a class of Window, and QTP sees this Window as simply one object. I can no longer verify the table data inside the window.
What may have happened that could cause the QTP class of the JavaWindow to change to a class of Window? No code changes have been made to this window, and I have verified that the Java versions on both my test box and app server have not changed and are valid for the current version of QTP.
Any insight into this issue would be greatly appreciated.
It sounds like the Java addin in QTP isn't working. There can be several causes for this.
QTP was loaded without selecting the Java addin in the addin manager
The test's Record and Run settings don't include your application
The Java application was opened before QTP (so QTP wasn't able to hook this application)
Along with the other answer, it might also happen, when you mess up your with Environment Variables. Lets say you installed StarTeam (it happened to me) recently which updates some of the existing environment variables set by QTP like JAVA_OPTIONS.
If it was working before & you could not figure out the issue, i would suggest you to repair UFT (using control panel options).
I have few test cases written in testNG and Junit using selenium for testing a webpage. But for executing them i need to go to command line or run them using eclipse each time i want to run. I want a centralised web page from where i can select what test i want to run and just click on some button to say run. And can see the output results on the same page. How could i achieve that?
Thanks-
Girish.
We use Jenkins in our project to do this kind of simplification when we want our business users to trigger tests. However, it may initially take some setup for each set of tests you want to run.