Skip to content

request for a new attribute for (executed) test-cases / suites: fail-classification #837

Closed

Description

@spooning

Originally submitted to Google Code by riccardo... on 6 May 2011

  1. Background
    I'm working on firmware development for embedded systems. Firmware gets tests via RobotFramework. The test host communicates via TCP/IP with the SUT (embedded system).

I've recently made an analysis of the whole history of regression tests done by the continuous integration server in the environment described above.
Going through the failed tests and the generated messages there showed up some typical types of failures and causes:
a) test execution errors (suite setup/teardown errors, initialization errors, sometimes keyword / tests data errors)
b) communication errors (communication between test host and SUT broken)
c) real regression errors - wrong behavior of the system and or software under test

The message for the various types of error differ very frequently and can't that easily be used to map them into one of the categories.

  1. Goal
    During post processing of the test logs (by the CI server) it should be possible to automatically determine if real regression failures occurred. Regression failures should be treated as "hard errors", other types of failures should be treated more as some kind of a warning.

In a CI scenario, developers are responsible for caring about "hard errors" (regression errors) and test maintainers need to take care about "warnings" and fix up issues like communication errors.
So finally the "noise" coming from not yet stable enough test environments or host <-> SUT communication should not be passed to the firmware developers.

  1. Request for new feature
    RF should provide an ability to plug-in a classification function which takes - in case of a failed test - the failure message and transforms into into a fail classification ID (string).
    This fail classification should be added as independent attribute to the test cases and also be displayed in the reports.

  2. Additional thoughts
    a) Similar to the statistics by tags, there should be a statistic by fail-classification

b) Depending from the fail-classification the test status should be set to FAIL (hard error) or "WARN" (instable, wanted checks of the test case not done because of generic problems not directly caused by the SUT)

c) It should be configurable, whether for the exit code of robot runner tests completed with WARN status are considered in the same way as with FAIL status.

In a CI scenario a build can be considered as successful too, if there a only tests with PASS and some with WARN status. Some tests might not be executed like specified, but there is no need for developers to check code changes. Rather it's the job for test maintainers to stabilize tests and test environment.

If anybody has similar needs, I'd like to discuss about and find the best "model" to handle that kind of test execution tracking.

Activity

  1. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 19 Jun 2011

    Sorry for not reacting for this issue sooner and sorry also for brutally WontFixing it. I explain he reasoning behind this decision below so that the numbers match the numbers you used in the description. This kind of larger enhancement ideas are generally better sent to robotframework-users so that they are open for wider discussion.

    1. Robot already the concept of criticality that allows you to separate "hard errors" from "warnings".

    2. Test have tags that can be used as classifiers. You can easily add them, you get statistics by them, and so on.

    Tags can already now be modified dynamically using Set Tags and Remove Tags keywords. When issue 177 is done, that can be done easily and transparently using listeners.

    4a) If you use tags as you classifiers, you get statistics for free.

    4b) Instead of WARN you can use a non-critical failure.

    4c) Currently the return code is the number of failed critical tests or always 0 when --NoStatusRC option is used. We could potentially add new command line option line --TotalFailStatusRC to return the number of all failed tests but I'm not sure how useful that would be. You can also already now parse more information related about statistics easily from the produces XML output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions