moodlehq / moodle-performance-comparison

Set of shell scripts to run Moodle performance tests using different hardware and configurations and compare results.
GNU General Public License v2.0
75 stars 39 forks source link

When web root is misconfigured, the tool doesn't detect it #38

Closed danpoltawski closed 10 years ago

danpoltawski commented 10 years ago

I was getting jmeter failing:

2013/12/04 14:16:16 WARN  - jmeter.save.SaveService: Problem loading XML, cannot determine class for element: html
2013/12/04 14:16:16 ERROR - jmeter.JMeter: Error in NonGUIDriver java.lang.NullPointerException
        at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:92)
        at org.apache.jmeter.JMeter.runNonGui(JMeter.java:754)
        at org.apache.jmeter.JMeter.startNonGui(JMeter.java:732)
        at org.apache.jmeter.JMeter.start(JMeter.java:390)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.jmeter.NewDriver.main(NewDriver.java:259)

Turned out it was because I misconfigured my web root:

cat ../moodle/testplan.jmx
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /moodle-perf/pluginfile.php/1/tool_generator/testplan/0/testplan_201312041415_1808.jmx was not found on this server.</p>
</body></html>
danpoltawski commented 10 years ago

Also, it didn't detect jmeter failing either.

dmonllao commented 10 years ago

We are checking the jmeter error code but if it is 0 we can only look for exceptions in the jmeter logs grepping around the code (in fact there is a TODO about it)

Submitting a patch to check curl's error code and creating #39

dmonllao commented 10 years ago

https://github.com/dmonllao/moodle-performance-comparison/tree/check-curl-error

dmonllao commented 10 years ago

Feel free to integrate it in all branches if you are happy with the change.

danpoltawski commented 10 years ago

+1 to integrate from me David (but I am not so familiar with the repo setup yet, so you do it).

dmonllao commented 10 years ago

Changes merged in 25, 26 and master. Closing.