Open cielavenir opened 4 years ago
Forgot to mention that I use TeamCity Enterprise 9.0.4 (build 32407)
Hi, I do have issues that I cannot utilize teamcity-messages for reporting tests if I print something in fixtures, which creates teamcity-message-block.
How is this going? Pasting the teamcity message needs to report failure. Simple, isn't it?
If this is fixed in latest teamcity, could you provide an (command-line) option not to make block if test fixture has output? Currently I need to sed pytest_plugin.py, which is pretty bad idea.
with #232 I don't have to sed-patch pytest_plugin.py at least.
Could you add a simple project with the problem?
I did paste the log for the project. As I'm not an admin of our teamcity server, I don't know how to post it here... Like this?
<?xml version="1.0" encoding="UTF-8"?>
<build-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" uuid="eef53c24-0255-4a9e-84bf-278be8b16c08" xsi:noNamespaceSchemaLocation="http://www.jetbrains.com/teamcity/schemas/9.0/project-config.xsd">
<name>test-newline</name>
<description />
<settings>
<parameters />
<build-runners>
<runner id="RUNNER_258" name="test" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[cat subtest_named.log]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
</build-runners>
<vcs-settings>
<vcs-entry-ref root-id="aaa" />
</vcs-settings>
<requirements />
<build-triggers />
<cleanup />
</settings>
</build-type>
subtest_named.log exists above "I got the following teamcity message"
I'm sorry, I spelled it wrong. Could you give me 1 simple test to add to this library test base?
Well, could you tell me how to interact teamcity server from teamcity-messages test suite?
The thing is I don't know whether teamcity-messages writes unexpected message or teamcity server interpretation is wrong. (I posted the issue to teamcity-messages in case of former). I personally don't think that teamcity-message itself cannot judge the message itself's rightfulness (unless interacting with teamcity server).
TeamCity server parses output from a build and searches special messages #teamcity[...] for logic. teamcity-messages only provides the output.
again, TC server does say success for the subtest_named test output even though it contains testFailed. Is this expected?
I will check it out. Have you tested this on the new TeamCity version? Could you give me a python test with this error?
sorry, currently I can only access to TC 9.0.4.
The command is python3 tests/guinea-pigs/unittest/subtest_named.py
, which is available at https://github.com/JetBrains/teamcity-messages/blob/master/tests/guinea-pigs/unittest/subtest_named.py .
(Due to https://github.com/JetBrains/teamcity-messages/issues/230 , I had to decipher https://github.com/JetBrains/teamcity-messages/blob/master/tests/integration-tests/unittest_integration_test.py and got the raw command line
python3 tests/guinea-pigs/unittest/subtest_named.py
.)From subtest_named I got the following teamcity message:
I made a teamcity job just to print this and running it caused the test passing. Teamcity summary definitely should show test failure.
test log in https://www.dropbox.com/sh/tvugn3zeebrhy8x/AABHy75s6Vu2Pflzl5HPslIya?dl=0