-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up the Mayo tests: The RECIPE
- Apache Jmeter and the JMX files with the test queries
- TBL build (of a Git branch) from the build machine
- Two servers: BLACK for hosting the Apache JMeter app and files, BLUE for hosting TBL and the Service
- The Service itself deployed on TBL on BLUE is in the Agrovoc.Zip file
- Java source code for translating the JTL files from the test into a summary (housed in this repository)
- Go to the build machine (build.tqinc.info/builds) and get the build for the branch that needs to be tested
- Connect to BLUE on Putty.exe and use the 'wget' utility to directly download the zipped build (from 1) into the user directory on BLUE
- Unzip the zip file on BLUE
- Move the tbl.war WAR file from the unzipped directory into the Apache Tomcat Webapps directory
- Open up the browser and go to URL BLUE/tbl/ (don't forget the slash)
- In the config page that opens up, select a default workspace and dropin folders (something like /user//TBL-Workspace/)
- Hit the Submit button in the Config page
- A Web.XML file will be generated and downloaded to your desktop
- Use WinSCP to move the Web.XML file to BLUE and move it to the ...Webapps/tbl/WEB-INF directory on BLUE
- Restart the Tomcat server on BLUE with "./shutdown.sh" and "./startup.sh" (you will very likely use "pkill -9 java" OR "ps -aef | grep java" followed by "kill -9 " to kill the server process.
- On the desktop browser, open up BLUE/tbl/tbl/
- TopBraid Live opens up. Upload the Agrovoc.zip project to TBL. Now you're all set to run the Apache JMeter test
- On BLACK, navigate to the "apache-jmeter" folder, the JTL and JMX files should be there.
- Select the MayoWithMixedQueries.jmx file. This file contains the tests you need to run
- On BLACK you need to run "bin/jmeter -n -t MayoWithMixedQueries.jmx -Dfile_format.testlog=2.0 -l listener.jtl". This command specifies the JMX file that contains the tests and the listener file that stores the results of the query executions
- Open up the catalina.out file on BLUE with "tailf catalina.out"
- When the test starts, the logs will start flashing across the screen. The Mayo test is running!
- Go get a coffee or watch a movie. The test should run for at least 30 Min (just to make sure nothing screws up the first time) and then the full fledged run can go on for up to 4 hours.
- Move the newly generated listener.jtl file after the test and transcribe it with Jtl2HtmlXformer.java and JtlToCsvTranslator.java. JtlFileMetricsExtractor.java is very memory intensive, is limited and has been deprecated
- That should summarize the test for you.
Good luck!!
THESE STEPS ARE BIG TIME WASTING GOTCHAS. SO THIS SHOULD HELP!
-
Check to see that Apache Tomcat has cleared away the old build version completely. This may require deleting the tbl directory under Webapps altogether. You may waste hours moving the correct tbl.war to the webapps folder only for Tomcat to stubbornly hang on to the old version files under the tbl folder. A comparison between the hexadecimal keys on the build machine and the Tomcat/Eclipse folder should catch this problem too
-
Did you remember to generate the Agrovoc ZIP and upload it to TBL on BLUE? If you did not do this, the log on BLUE will be silent because all the test queries from BLACK will be unable to find the service on BLUE and will all return with HTTP 404 service not found
-
The SPARQLMotion Script file, which contains the definitions of each query as an SM Script needs to be included in the Agrovoc ZIP. Without this, the server will return a SPARQLMotion script NOT FOUND error.
-
Create new workspace for TBL on BLUE. This may work when everything else fails.