class not found error and test still passes

In one of my tests I had a class not found error so the test didn't execute but TC still called it a pass. What is the mechanism for detecting is a test passes?

On a related note, if I call a batch file that executes a process how does it know if the batch file was successful and how are the results of the batch file (log output) returned to TC?

thanks

4 comments
Comment actions Permalink

In one of my tests I had a class not found error so
the test didn't execute but TC still called it a
pass. What is the mechanism for detecting is a test
passes?


Are you sure that your test was run by TeamCity? Have you seen it in the full build log? TeamCity attaches own listener to the build process and analyzes events from it (the mechanizm is different depending on build runner used).


On a related note, if I call a batch file that
executes a process how does it know if the batch file
was successful and how are the results of the batch
file (log output) returned to TC?


The final build status depends on the result code of the build process.
Build is considered sucessful if result code is 0. How do you run your build?

Regards,
KIR

0
Comment actions Permalink

>Are you sure that your test was run by TeamCity? Have you seen it in the full build log? >TeamCity attaches own listener to the build process and analyzes events from it (the >mechanizm is different depending on build runner used).

The prob was it wasnt' running a batch of tests, just one junit and haltonfailure="no" was set so the build said "build successful" even though the test said it failed. I changed to "yes" and it's ok now.

>> On a related note, if I call a batch file that
>> executes a process how does it know if the batch file
>> was successful and how are the results of the batch
>> file (log output) returned to TC?

>The final build status depends on the result code of the build process.
>Build is considered sucessful if result code is 0. How do you run your build?

How do you return a 0 from a batch file? I'm using Ant for most stuff, just wondering if I created another build run from a batch file and wanted to return a result from the batch fil eand a log of stuff how could I attach the log as results to TC? The reason I ask is I might need to use quick test pro to run some tests and somehow return the results to TC. THere is no QTP integration with ANT.

0
Comment actions Permalink

Phil,

Why do you run your build using bat file? What's wrong with direct Ant integration provided by TeamCity? You'll get a lot of nice features with direct Ant integration.
If you run ant from batch file it is really difficult to provide good integration with TeamCity - you have to specify a number of additional libraries to classpath, some properties and additional Ant listener.

Regards,
KIR

0
Comment actions Permalink

"Why do you run your build using bat file? What's wrong with direct Ant integration provided by TeamCity? You'll get a lot of nice features with direct Ant integration.
If you run ant from batch file it is really difficult to provide good integration with TeamCity"

Ok, I guess I can write an ant task to call quick test pro. How would I return the results (success failure, result string/report) to Team City from a Quick Test Pro custom ant task?

0

Please sign in to leave a comment.