Friday, January 18, 2008

OGCE Local build/run tests almost done

The build and JMeter run tests for the OGCE portal are almost done. I've got a script finished that builds the portal from scratch, runs the JMeter tests, and sends all the result files to SVN.

Things to do:
  1. Try somehow to show the HTTP response errors for the JMeter modules that failed
    1. Maybe give a URL link to the errors within the XML document?
  2. Highlight the tests that failed within the XML document (via XSL stylesheets!)

Adding XSL stylesheet info line on second line of XML document

Solution for #1:
Clip the ?xml...? first line from the XML document, and copy the rest of the XML file into a temporary file. Then insert XSL tag-sheet info as well as the XML document header (which you clipped) into the original file (overwrite the file). Finally, append the temp file's contents to the original file and voila! You've inserted the XML stylesheet info on the 2nd line of your file!

num_of_lines=`cat OGCEJMeterResults.xml | wc -l`

tail -n $[$num_of_lines - 1] OGCEJMeterResults.xml > OGCEJMeterResults-temp.xml

echo (THE XML AND XSL HEAD TAGS HERE) > OGCEJMeterResults.xml

cat OGCEJMeterResults-temp.xml >> OGCEJMeterResults.xml

rm OGCEJMeterResults-temp.xml



Wednesday, January 16, 2008

Local OGCE build/run test

I'm setting up a local (non-NMI) build and run test of the OGCE framework.

Steps completed:
1) Script made that:
- svn checks out portal
- does a clean build on portal (maven, tomcat bundled)
- starts up portal on tomcat server
- runs JMeter test file against portal and stores results of test in XML file
2) XSLT Style sheet made that converts JMeter resultant XML output file into readable HTML

Things to do:
1) Auto insert XSL tag into the JMeter resultant XML output file (tag specifying the XSL stylesheet must but at the top of XML file to have it display properly):

2) Send the XML test results file and stylesheet to soureforge account
3) Store build text output in a file, and send to soureforge account