Forum Discussion

squid-box's avatar
squid-box
New Contributor
13 years ago

Outputting text to the console window which executes TestExecute?

I've looked for a while now, but haven't been able to find a solution to my question.



My setup is as follows:

TeamCity triggers a TestExecute (8) run by commandline, which works fine on the BuildAgent I've set up. I currently publish the .mht log as an artifact, which is an "acceptable" way of reporting test outcomes.



I would prefer to be able to use TeamCity's "Service Messages" (See TeamCity documentation) to report progress and results.



I was hoping to avoid using the fairly configuration-heavy solution with MSBuild already on the forum, and just output status updates from my test executions. I haven't been able to find a way to output text from TestExecute to the console window running the process.





Example usage:

*Console window executing test run:

TestExecute.exe Suite.pjs /run /project:FullTests /SilentMode /exit



*Inside Test Suite:

function Ignored(testName, reason)

{

    Console.Write("##teamcity[testIgnored name=\"testName\" message=\"reason\"]");

}



*Console window executing test run:

##teamcity[testIgnored name="aTest" message="A good reason".]





Is there a function which makes "Console.Write" possible? Is it possible with eg. an ActiveXObject ?

3 Replies