Generic Test Results Parser for Bamboo

Description

Simple file parsing and test case handling for generic test result formats.

Just select the files, create a regular expression matching lines that should be treated as failed test cases and lines that should be treated as passed test cases.

5 comments:

  1. When an output file is parsed using the regular expressions defined for a task (line mask, error mask, non error mask), should the parse result for each line of the file be viewable in the Build Log?

    ReplyDelete
  2. Code is here, I dont remember logging everything, only filenames:

    https://bitbucket.org/iuliushutuleac/bamboo-logparser-plugin/src/3ed17954862289e1742f5b6c1ee73aa7287859df/src/main/java/org/valens/LogParserCollector.java?at=master&fileviewer=file-view-default

    I will double check.

    Julius

    ReplyDelete
    Replies
    1. It looks like the input file *must* be ASCII only. The utility I was using was writing out UTF-8, and all my test cases came back as successful until I forced ASCII output. Now the defined regex works as expected. Many thanks for your help.

      Delete
    2. Great piece of information ! Thanks

      Delete
  3. Our tests are run by a shell script, with output saved in a file. I thought this plugin let me capture the number of passing/failing tests, but it quits with these log lines:

    2018-08-10 14:48:42,590 INFO [2-BAM::...::Agent:pool-5-thread-1] [TaskExecutorImpl] Starting task 'Parse test.py output' of type 'com.valens.bamboo-logparser-plugin:myGenericLogParserTask'
    2018-08-10 14:48:42,817 INFO [2-BAM::...::Agent:pool-5-thread-1] [TaskResultBuilder] Failing task since test cases were expected but none were found.

    How do I mark the shell script task as generating test results, so Parse Log Task can analyze them?

    ReplyDelete