Skip to content

Pull Request Tests with [feature] tag in commits should report failed in CI when "Feature" tests fail #4641

Closed

Description

I have had 2 pull requests merged where I missed the failing tests due to Travis CI reporting the build passing when tests actually failed. It is partially my fault for not being completely attentive to the test results, but in my defense there are a very large number of feature tests run and it is easy to lose track in the sea of results.

IMO, the CI should report the build failed when when the [feature] tag is present in the commit and any "Feature" test fails. This will make it easier to spot when something goes wrong.

Example PR #4494 Travis CI Passing with failed test https://travis-ci.org/PowerShell/PowerShell/jobs/266123025

Activity

  1. changed the title [-]Pull Request Tests with [feature] tag should report failed in CI when "Feature" tests fail[/-] [+]Pull Request Tests with [feature] tag in commits should report failed in CI when "Feature" tests fail[/+] on Aug 22, 2017
  2. added this to the milestone on Aug 22, 2017
  3. TravisEz13 commented on Aug 22, 2017

    @TravisEz13
    Member

    This shouldn't be specific to the feature tag. It indicates there is some bug in Test-PSPesterResults in build.psm1. I tried a simple repro locally, and couldn't repro the issue.

  4. markekraus commented on Aug 22, 2017

    @markekraus
    ContributorAuthor

    I had a really fun one #4622. https://travis-ci.org/PowerShell/PowerShell/jobs/266586350#L8280 That one was an unhandled exception in a Job, that killed the calling process, and the pester process, and the test "passed". That's when I started looking very closely at the test results.

  5. TravisEz13 commented on Aug 22, 2017

    @TravisEz13
    Member

    This is interesting... pester must write the result as it is going because Test-PSPesterResults will fail if the results file is missing.

    I think we will have to switch to running Invoke-Pester with -PassThru and use those results to determine if the tests passed or failed.

  6. TravisEz13 commented on Aug 22, 2017

    @TravisEz13
    Member

    I found one issue... Start-PSPester is not checking the exit code from powershell.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions