Hi, folks,
Some of you know that we can execute a single unit test of Hackystat inside
Eclipse. It makes life much easier. If you don't know it yet you can email Philip,
Aaron, Takuya or me to ask how to configure your Eclipse JUnit.
Philip, Aaron and I ever ran into a problem when we ran some unit tests inside Eclipse. Here is the red flagged error message:
12/10 16:04:04 Error defining an SDT in [EMAIL PROTECTED]:
org.hackystat.kernel.sdt.SensorDataTypeException: Undefined wrapper class org.hackystat.app.perf.sdt.Perf
It happens because we tell JUnit the Hackystat war directory, for example I specified
-Dhackystat.war.dir=c:\work\hackyBuild\build\war when I ran unit tests.
So SdtManager knows my SDTs are located at
C:\work\hackyBuild\build\war\WEB-INF\sdt
, and I have following SDT definition files:
sdt.activity.xml
sdt.baddata.xml
sdt.bufftrans.xml
sdt.build.xml
sdt.coverage.xml
sdt.filemetric.xml
sdt.perf.xml
sdt.unittest.xml
All of them but sdt.perf.xml have wrapper classes in module hackyStdExt.When we run a unit test of hackyStdExt which requires SDT our SdtManager will load all
these SDTs and do the validation. Since org.hackystat.app.perf.sdt.Perf is not in hackyStdExt
JUnit will not be able to find it using reflection. It's the reason why we have red flagged error
message.
There is no best solution to this. You can either ignore this error or manually remove the
annoying SDT definition file such as sdt.perf.xml in my case. (It is copied over to war folder
by ant quickStart or ant freshStart)
If you have better idea please let us know.
Thanks, Hongbing
