You have created your Agent component here
Now it is time to build it.
Building
In Java world, it is easiest to have class and other resources packaged into JAR files.
So for now you need to copy this the pom.xml and build.xml files into the root project folder.
Prior to running these files, you may want to change:
- The used ATS version as declared in the pom.xml
- The component.name parameter in the build.xml
- The class packages in the agent-component-generate-client Ant target.
Currently, all this info is set according to the User Guide examples.
After running the pom.xml, Maven will retrieve the ATS artifacts and will then start Ant with the build.xml file.
If everything goes as OK a few seconds later you will see a new folder target and in its dist subfolder, there will be two JAR files.
You can go ahead and open these two JAR files to see their content.
The produced server-side JAR
We call it a server-side JAR because it will operate on the side of the Agent. Its name ends with -autoserver.jar because this is how we set it by the build script. This JAR will work like a service accepting commands from the client-side JAR.
It has all action classes and their source files in the root folder.
It also has the agent_descriptor.xml in its META-INF subfolder.
The produced client-side JAR
We call it a client-side JAR because it will operate on the side of the Test Executor. Its name ends with -autoclient.jar because this is how we set it by the build script.
It also contains classes with the same names as the ones in the server-side JAR, but if you open them you will be surprised by their content.
These classes have the same names, their methods have the same names and input arguments as the server-side ones, but their body is very different.
Deploying
The client-side JAR
This one must be present in the classpath of the Test Executor. From that point on you can use them in your test code.
The server-side JAR
This one must be placed in the ats-agent\actions subfolder of your ATS Agent distribution.
Even a fresh Agent will have some such components already available. These are the ones ATS uses internally to do something (like filesystem operations) on the host the Agent is working on.
In case your actions depend on some other third party classes, you must place their JARs in the ats-agent/actions_dependencies subfolder of your ATS Agent distribution.
Proceed with running your actions in some performance test.
Back to parent page
Go to Table of Contents