dimanche 29 octobre 2017

How configure Gitlab CI to parse test output?

I am working on Gitlab and I would like to setting up a CI (it is the first time I configure something like that, please assume that I am a beginner)

I wrote a code in C with a simple test in Cunit, I configured CI with a "build" job and a "test" job. My test job succeed whereas I wrote a KO test, when I open the job on Gitlab I see the failed output, but the job is marked "Passed".

How can I configure Gitlab to understand that the test failed ?

I think there is a parsing configuration somewhere, I tried in "CI / CD Setting -> Test converage parsing" but I think it is wrong, and it did not work.

I let you the output of my test :

     CUnit - A unit testing framework for C - Version 2.1-2
     http://ift.tt/1xBUNha


Suite: TEST SUITE FUNCTION
  Test: Test of function::triple ...FAILED
    1. main.c:61  - CU_ASSERT_EQUAL(triple(3),1)

Run Summary:    Type  Total    Ran Passed Failed Inactive<br/>
              suites      1      1    n/a      0        0<br/>
               tests      1      1      0      1        0<br/>
             asserts      3      3      2      1      n/a<br/>

Elapsed time =    0.000 seconds

Aucun commentaire:

Enregistrer un commentaire