It would be nice to add the ability to disable tests and have them listed in the xml report and logger report.
I've got a situation where I have a some function blocks that I want to test. Most of the functionality can be tested in quick tests that only take a cycle or two, but some tests are dealing with timeouts that can make the test suite run for a few minutes. I'd like to be able to setup two configurations (through applications) that will disable the longer running tests so that I can quickly iterate my code. I have an input to my test suite function block that I can set to disable the longer running tests, but I have no easy way to know how many disabled tests there are when I run the quick config.
If we could disable tests with a reason that would be even better. Then I could write a test for a future feature and have it shown as disabled rather than just failing before the feature is written.
Thanks so much for the work that has gone into this project. It is really helpful and I greatly appreciate it.
more posts ...
Hi,
maybe it is an undocumented feature(?) but your request is allready implemented into v1.2.0.0 :-)
AFAIK Use
This will be counted in the reporting as a skipped test.
(both logged in PLC Log and in the XML.report)
Does
TEST_FINISHED()
need to be called when the test is marked asdisabled_
? or is it sufficient to just have it marked as skipped/disabled?If you declare a test, calling TEST_FINISHED() is mandatory, even if the test will be disabled;
Note that 'Disabled' is case insensitive.
Last edit: aliazzz 2022-01-04
It seems it is not reported as disabled in the xml report or in the log. (See attached screen shots), but is reported as SKIPPED in the test suite. Maybe I misunderstand the disabled field for
<testsuites>
I was expecting that to give the total disabled or skipped tests.It does get marked as skipped, but calling TEST_FINISHED() doesn't mark it finished. (Not sure if it should)
Did some digging on the format and I can't seem to find
disabled
as an attribute in the xsd (https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd) howeverskipped
is mentioned, but in the context of<testsuite>
XSD
https://forge.codesys.com/prj/cfunit/code/HEAD/tree/trunk/coUnit/XSD/JUnitv5.xsd
Compliance
https://forge.codesys.com/prj/cfunit/code/HEAD/tree/trunk/coUnit/XSD/QA%20xUnit.xml%20template.png?format=raw
Last edit: aliazzz 2022-01-05
Since this ticket is fulfilled within scope I will close the issue.