Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1078

Create a pytest plugin for random bugs

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 3.0.3
    • Fix Version/s: 3.1.0
    • Component/s: Tests

      Description

      The current implementation of RandomBug is not well done. For instance, the "STRICT" mode does not work.
      As we are using pytest, we should create a plugin that does this one thing the right way.

      The annotation could be:

      @pytest.mark.random('Reason, ticket, ... ', **kwargs)
      def test_foo():
          pass
      

      Where possible arguments are:

      • condition (bool): the condition to use the random, if False run the test normally. Default is True.
      • repeat (int): how many times should we repeat the test. Default is 10.
      • mode (str):
        • "RELAX": will retry as repeat times until it succeeds. Default value.
        • "STRICT": will repeat it until it fails or hits the repeat limit.
        • "BYPASS": skip the test.

      Also, it should be possible to set the mode from the envar RANDOM_BUG_MODE.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 3 hours, 40 minutes
                  3d 3h 40m