Comcast / plax

A test automation engine for messaging systems
Apache License 2.0
7 stars 14 forks source link

Issue #134: Octane report plugin support #137

Closed satwic007 closed 3 years ago

satwic007 commented 3 years ago

Description: This PR adds Octane plugin code. We just need to add the config to the plaxrun file and plaxrun takes care of the rest.

Sample usage:

  1. I added config (referred in the doc/octane_plugin.md below) to cmd/plaxrun/demos/waitrun.yaml and ran the command - plaxrun -run cmd/plaxrun/demos/waitrun.yaml -dir demos -g wait-no-prompt -json
  2. Octane plugin - console log:
    <test_result>
    <product_areas>
    <product_area_ref id="123456"></product_area_ref>
    </product_areas>
    <test_runs>
    <test_run name="test-wait waitrun-0.0.1:wait-no-prompt:wait" duration="606" status="Failed" started="1632173133000">
    <test_fields>
    <test_field type="Framework" value="plax"></test_field>
    </test_fields>
    <error>Broken: Err: Broken: phase phase1: Broken: step 5: Broken: Javascript problem: failure: too slow: 605</error>
    </test_run>
    </test_runs>
    </test_result>
  3. Equivalent Plax console log:
    {
    "name": "waitrun",
    "version": "0.0.1",
    "testsuite": [
    {
      "name": "waitrun-0.0.1:wait-no-prompt:wait",
      "tests": 1,
      "passed": 0,
      "skipped": 0,
      "failures": 0,
      "errors": 1,
      "testcase": [
        {
          "name": "test-wait",
          "file": "/Users/smudig200/Documents/comcastgit/octane_plugin/plax/demos/test-wait.yaml",
          "status": "error",
          "time": 606178000,
          "started": "2021-09-20T21:25:33.730331Z",
          "message": "Broken: Err: Broken: phase phase1: Broken: step 5: Broken: Javascript problem: failure: too slow: 605"
        }
      ],
      "timestamp": "2021-09-20T21:25:33.728889Z",
      "time": 607622000
    }
    ],
    "tests": 1,
    "passed": 0,
    "skipped": 0,
    "failures": 0,
    "errors": 1,
    "timestamp": "2021-09-20T21:25:33.728736Z",
    "time": 607783000
    }