Skip to content

Make runner better consume test output #258

Closed

Description

@ansyral

currently the runner would analyze test output from runner console but it has some shortcomings.

  1. error messages output by the tests would also be printed to the System.error stream. So it had to tell runner error or test error.
  2. the regex expression cannot cover all the cases as the stack trace could contain any text if the test failed.

Activity

  1. ansyral commented on Aug 1, 2018

    @ansyral
    CollaboratorAuthor
  2. ansyral commented on Aug 1, 2018

    @ansyral
    CollaboratorAuthor

    I'd like to redesign the output format generated by the runner. The output item would have following fields as below:

    {
        phase: string;
        attributes: Map<string, string>;
        message: string;
        stackTrace: string;
        type: TestReportType; // enum with value info or error
    }
    

    And the runner would always output in the following way:
    @@<RunnerOutput-'serialized json string of the outputitem'-RunnerOutput>@@

  3. ansyral commented on Aug 2, 2018

    @ansyral
    CollaboratorAuthor
  4. ansyral commented on Aug 3, 2018

    @ansyral
    CollaboratorAuthor

    The above solution could solve problem1. While for problem2, I found another issue due to the limit of console, if the stacktrace is huge, then the data received would be trimmed and the data cannot be successfully analyzed.

  5. ansyral commented on Aug 7, 2018

    @ansyral
    CollaboratorAuthor

    It turns out the truncation issue is due to the limitation of exec, I've sent a pr to use spawn instead.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions