(no subject)

Page 1.0 of 1.3599999999999999
  • aliazzz

    aliazzz - 2022-01-04
     
  • aliazzz

    aliazzz - 2022-01-04

    Hi,

    maybe it is an undocumented feature(?) but your request is allready implemented into v1.2.0.0 :-)

    AFAIK Use

    Test('Disabled_TestXYZ');
    
    
    
    Test_Finished();
    

    This will be counted in the reporting as a skipped test.
    (both logged in PLC Log and in the XML.report)

     
  • jtebokkel

    jtebokkel - 2022-01-04

    Does TEST_FINISHED() need to be called when the test is marked as disabled_? or is it sufficient to just have it marked as skipped/disabled?

    METHOD T101_Process
    VAR_INPUT
    END_VAR
    VAR_INST
        mxT : UINT;
    END_VAR
    
    IF xLiveDB THEN
        TEST('T101_Process');
    ELSE
        // gc_sDisable : STRING(10) := 'disabled_';
        TEST(concat(gConst.gc_sDisable, 'T101_Process'));
    
        // Is this call necessary?
        TEST_FINISHED();
    
        RETURN;
    END_IF
    
    CASE mxT OF
        0: // init
            mxT := 10;
        10: // multi stage test
            mxT := 20;
        ELSE
            TEST_FINISHED();
    END_CASE
    
     
    👍
    1
  • aliazzz

    aliazzz - 2022-01-04

    If you declare a test, calling TEST_FINISHED() is mandatory, even if the test will be disabled;

    TEST('DISABLED_ThisTestWillBeIgnored');
    
    AssertEquals(Expected := a,
                 Actual := b,
                 Message := 'A does not equal B');
    
    TEST_FINISHED();
    

    Note that 'Disabled' is case insensitive.

     

    Last edit: aliazzz 2022-01-04
  • aliazzz

    aliazzz - 2022-01-05

    Since this ticket is fulfilled within scope I will close the issue.

     
  • aliazzz

    aliazzz - 2022-01-05
    • status: open --> closed
     

Log in to post a comment.