Giter Club home page Giter Club logo

nunit-plugin's Introduction

NUnit Plugin

Build Status Coverage LOC Contributors Jenkins Plugin Jenkins Plugin Installs

Introduction

This plugin allows you to publish NUnit test results.

Pipeline example

For more information refer to NUnit Pipeline Steps

For Scripted pipeline

node {

    ...

    stage("Publish NUnit Test Report") {
        nunit testResultsPattern: 'TestResult.xml'
    }

    ...

}

For Declarative pipeline

pipeline {
    agent any

    ...

    stages {

        ...

        stage("Publish NUnit Test Report") {
            steps {
                nunit testResultsPattern: 'TestResult.xml'
            }
        }

        ...

    }
}

Version History

See the releases and the changelog

Contributing

Refer to our contribution guidelines

LICENSE

Licensed under MIT, see LICENSE

nunit-plugin's People

Contributors

alanharder avatar bartensud avatar brantone avatar daniel-beck avatar dependabot[bot] avatar ericbartusch avatar fabiodcasilva avatar github-actions[bot] avatar heincouwet avatar jenkinsci-cert-ci avatar jonesbusy avatar kinow avatar ndeloof avatar redsolo avatar s-morita-being avatar slide avatar syl20bnr avatar tempora-mutantur avatar timotei avatar v-karbovnichy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nunit-plugin's Issues

Failure on teardown is not considered as test error/failure

Jenkins and plugins versions report

Jenkins: 2.346.3
OS: Windows Server 2019 - 10.0
Java: 1.8.0_402 - Amazon.com Inc. (OpenJDK 64-Bit Server VM)

nunit:0.27
xunit:3.1.0

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows Server 2019 - 10.0

Reproduction steps

  • On one of test-suite, error on teardown occurred (test executed successfully and passed):
    executed="True" result="Failure" success="False"

  • On general status of test-results:
    errors="0" failures="0"

Expected Results

  • On one of test-suite, error on teardown occurred (test executed successfully and passed):
    executed="True" result="Failure" success="False"

  • On general status of test-results:
    errors="1" failures="1"

Actual Results

  • On one of test-suite, error on teardown occurred (test executed successfully and passed):
    executed="True" result="Failure" success="False"

  • On general status of test-results:
    errors="0" failures="0"

Anything else?

No response

Are you interested in contributing a fix?

No response

Set info about the test results in the env so that post steps can access it

What feature do you want to see added?

I would like to be able to access the number of failed tests in a post stage where I send a Slack message about the failure of the job. Is there already a way to do this? I am definetly up for doing this myself, is there something I should think about before I start?

Upstream changes

No response

All Links are text

Jenkins and plugins versions report

All links are display as text and not clickable.
It extremely uncorfatable that way.

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows

Reproduction steps

All links are display as text and not clickable.
It extremely uncorfatable that way.

Expected Results

Link to be clickable blue links

Actual Results

Not clicable links
image

Anything else?

No response

Are you interested in contributing a fix?

No response

Plugin doesn't create attachments file for each test result

Jenkins and plugins versions report

Jenkins: 2.445
OS: Windows 10 - 10.0
Java: 11.0.2 - Oracle Corporation (OpenJDK 64-Bit Server VM)

ant:497.v94e7d9fffa_b_9
antisamy-markup-formatter:162.v0e6ec0fcfcf6
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
apache-httpcomponents-client-5-api:5.2.1-1.1
authentication-tokens:1.53.v1c90fd9191a_b_
bootstrap5-api:5.3.2-2
bouncycastle-api:2.29
branch-api:2.1128.v717130d4f816
build-timeout:1.31
caffeine-api:3.1.8-133.v17b_1ff2e0599
checks-api:2.0.2
cloud-stats:320.v96b_65297a_4b_b_
cloudbees-folder:6.858.v898218f3609d
command-launcher:107.v773860566e2e
commons-lang3-api:3.13.0-62.v7d18e55f51e2
commons-text-api:1.11.0-94.v3e1f4a_926e49
config-file-provider:959.vcff671a_4518b_
credentials:1309.v8835d63eb_d8a_
credentials-binding:642.v737c34dea_6c2
declarative-pipeline-migration-assistant:1.6.1
declarative-pipeline-migration-assistant-api:1.6.1
display-url-api:2.200.vb_9327d658781
docker-commons:439.va_3cb_0a_6a_fb_29
docker-java-api:3.3.1-79.v20b_53427e041
docker-plugin:1.5
docker-workflow:572.v950f58993843
dotnet-sdk:1.4.0
durable-task:523.va_a_22cf15d5e0
echarts-api:5.4.0-7
email-ext:2.102
font-awesome-api:6.4.2-1
git:5.2.1
git-client:4.5.0
github:1.37.3.1
github-api:1.316-451.v15738eef3414
github-branch-source:1741.va_3028eb_9fd21
gradle:2.9
instance-identity:185.v303dc7c645f9
ionicons-api:56.v1b_1c8c49374e
jackson2-api:2.15.3-372.v309620682326
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.9-1
jdk-tool:73.vddf737284550
jjwt-api:0.11.5-77.v646c772fddb_0
jquery3-api:3.7.1-1
junit:1259.v65ffcef24a_88
ldap:711.vb_d1a_491714dc
mailer:463.vedf8358e006b_
matrix-auth:3.2.1
matrix-project:822.824.v14451b_c0fd42
metrics:4.2.18-442.v02e107157925
mina-sshd-api-common:2.11.0-86.v836f585d47fa_
mina-sshd-api-core:2.11.0-86.v836f585d47fa_
msbuild:1.30
mstest:1.0.5
mstestrunner:1.5.0
nunit:485.ve8a_85357320d
okhttp-api:4.11.0-157.v6852a_a_fa_ec11
pam-auth:1.10
pipeline-build-step:516.v8ee60a_81c5b_9
pipeline-github-lib:42.v0739460cda_c4
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-graph-view:204.vf6b_83d21e246
pipeline-groovy-lib:689.veec561a_dee13
pipeline-input-step:477.v339683a_8d55e
pipeline-maven:1362.vee39a_d4b_02b_1
pipeline-maven-api:1362.vee39a_d4b_02b_1
pipeline-milestone-step:111.v449306f708b_7
pipeline-model-api:2.2150.v4cfd8916915c
pipeline-model-definition:2.2150.v4cfd8916915c
pipeline-model-extensions:2.2150.v4cfd8916915c
pipeline-rest-api:2.34
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2150.v4cfd8916915c
pipeline-stage-view:2.34
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.6.0
postbuild-task:1.9
powershell:2.1
resource-disposer:0.23
scm-api:676.v886669a_199a_a_
script-security:1326.vdb_c154de8669
snakeyaml-api:2.2-111.vc6598e30cc65
ssh-credentials:308.ve4497b_ccd8f4
ssh-slaves:2.916.vd17b_43357ce4
sshd:3.312.v1c601b_c83b_0e
structs:337.v1b_04ea_4df7c8
timestamper:1.26
token-macro:384.vf35b_f26814ec
trilead-api:2.84.v72119de229b_7
variant:60.v7290fc0eb_b_cd
vstestrunner:1.0.8
workflow-aggregator:596.v8c21c963d92d
workflow-api:1283.v99c10937efcb_
workflow-basic-steps:1042.ve7b_140c4a_e0c
workflow-cps:3806.va_3a_6988277b_2
workflow-durable-task-step:1289.v4d3e7b_01546b_
workflow-job:1360.vc6700e3136f5
workflow-multibranch:756.v891d88f2cd46
workflow-scm-step:415.v434365564324
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:865.v43e78cc44e0d
ws-cleanup:0.45

What Operating System are you using (both controller, and any agents involved in the problem)?

Win10

Reproduction steps

1.Execute automated test which will include invocation TestContext.AddTestAttachments(filePath) in SetUp.
2.After test go to failed test and check added attachments.
3.Test result has only 3 sections like Error Message, Stacktrace and Standard Output without Attachments

Screen

Expected Results

Test result has attachment file

Actual Results

Test result doesn't have attachment file added during test execution.

Anything else?

This is part of test result xml file for test which added attachment:

<attachments>
                <attachment>
                  <filePath>C:\FileTasks\Test.txt</filePath>
                </attachment>
</attachments>

Are you interested in contributing a fix?

No response

NUnit Publisher fails: Remote call on connection failed

Jenkins and plugins versions report

Environment

Jenkins: 2.303.3
OS: Linux - 4.9.0-7-amd64
Java: 11.0.13 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
Office-365-Connector:4.15.2
Parameterized-Remote-Trigger:3.1.5.1
ace-editor:1.1
active-directory:2.25
ansicolor:1.0.0
ant:1.12
antisamy-markup-formatter:2.4
apache-httpcomponents-client-4-api:4.5.13-1.0
artifactory:3.13.2
authentication-tokens:1.4
aws-credentials:1.28.1
aws-java-sdk:1.11.976
aws-java-sdk-cloudformation:1.12.101-300.vc09c7be9cb57
aws-java-sdk-codebuild:1.12.101-300.vc09c7be9cb57
aws-java-sdk-ec2:1.12.101-300.vc09c7be9cb57
aws-java-sdk-ecr:1.12.101-300.vc09c7be9cb57
aws-java-sdk-ecs:1.12.101-300.vc09c7be9cb57
aws-java-sdk-elasticbeanstalk:1.12.101-300.vc09c7be9cb57
aws-java-sdk-iam:1.12.101-300.vc09c7be9cb57
aws-java-sdk-logs:1.12.101-300.vc09c7be9cb57
aws-java-sdk-minimal:1.12.101-300.vc09c7be9cb57
aws-java-sdk-ssm:1.12.101-300.vc09c7be9cb57
azure-credentials:198.vf9c2fdfde55c
azure-sdk:61.v6a8af1f5f5b6
azure-vm-agents:822.v3a18fc3d2de1
badge:1.9
basic-branch-build-strategies:1.3.2
blueocean:1.25.1
blueocean-autofavorite:1.2.4
blueocean-bitbucket-pipeline:1.25.1
blueocean-commons:1.25.1
blueocean-config:1.25.1
blueocean-core-js:1.25.1
blueocean-dashboard:1.25.1
blueocean-display-url:2.4.1
blueocean-events:1.25.1
blueocean-git-pipeline:1.25.1
blueocean-github-pipeline:1.25.1
blueocean-i18n:1.25.1
blueocean-jira:1.25.1
blueocean-jwt:1.25.1
blueocean-personalization:1.25.1
blueocean-pipeline-api-impl:1.25.1
blueocean-pipeline-editor:1.25.1
blueocean-pipeline-scm-api:1.25.1
blueocean-rest:1.25.1
blueocean-rest-impl:1.25.1
blueocean-web:1.25.1
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-1
bouncycastle-api:2.25
branch-api:2.7.0
build-timeout:1.20
build-user-vars-plugin:1.8
buildtriggerbadge:2.11
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloud-stats:0.27
cloudbees-bitbucket-branch-source:2.9.11
cloudbees-folder:6.16
code-coverage-api:2.0.4
command-launcher:1.6
conditional-buildstep:1.4.1
config-file-provider:3.8.1
configuration-as-code:1.54
copyartifact:1.46.2
credentials:2.6.1
credentials-binding:1.27
custom-tools-plugin:0.8
dashboard-view:2.18
data-tables-api:1.11.3-4
display-url-api:2.3.5
docker-build-publish:1.3.3
docker-commons:1.17
docker-java-api:3.1.5.2
docker-plugin:1.2.3
docker-workflow:1.26
durable-task:1.39
echarts-api:5.2.2-1
email-ext:2.84
emailext-template:1.2
embeddable-build-status:2.0.3
envinject:2.4.0
envinject-api:1.8
extended-choice-parameter:0.82
extended-read-permission:3.2
extensible-choice-parameter:1.8.0
external-monitor-job:1.7
favorite:2.3.3
filesystem_scm:2.1
font-awesome-api:5.15.4-1
forensics-api:1.6.0
git:4.10.0
git-changelog:3.13
git-client:3.10.0
git-parameter:0.9.13
git-server:1.10
github:1.34.1
github-api:1.133
github-branch-source:2.11.3
github-oauth:0.34
gitlab-api:1.0.6
gitlab-branch-source:1.5.9
gitlab-plugin:1.5.22
golang:1.4
google-login:1.6
gradle:1.37.1
groovy-postbuild:2.5
h2-api:1.4.199
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.27
http_request:1.11
image-tag-parameter:1.10
ivy:2.1
jackson2-api:2.13.0-230.v59243c64b0a5
javadoc:1.6
jaxb:2.3.0
jdk-tool:1.5
jenkins-design-language:1.25.1
jira:3.6
jira-steps:1.6.0
jjwt-api:0.11.2-9.c8b45b8bb173
job-dsl:1.78.1
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.53
ldap:2.7
lockable-resources:2.12
mailer:1.34
mapdb-api:1.0.9.0
mask-passwords:3.0
matrix-auth:2.6.8
matrix-project:772.v494f19991984
maven-plugin:3.15.1
mercurial:2.14
metrics:4.0.2.8
momentjs:1.1.1
monitoring:1.88.0
node-iterator-api:1.5.1
nunit:0.27
oic-auth:1.8
okhttp-api:4.9.2-20211102
p4:1.13.0
pam-auth:1.6.1
parallel-test-executor:1.13
parameterized-trigger:2.41
pipeline-aws:1.43
pipeline-build-step:2.15
pipeline-graph-analysis:1.11
pipeline-input-step:2.12
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.2
pipeline-model-definition:1.9.2
pipeline-model-extensions:1.9.2
pipeline-rest-api:2.19
pipeline-stage-step:2.5
pipeline-stage-tags-metadata:1.9.2
pipeline-stage-view:2.19
pipeline-utility-steps:2.10.0
plain-credentials:1.7
plugin-util-api:2.5.1
popper-api:1.16.1-2
popper2-api:2.10.2-1
promoted-builds:878.v12d3f7937690
pubsub-light:1.16
rebuild:1.34
resource-disposer:0.16
run-condition:1.5
saml:2.0.9
sbt:1.5
scm-api:608.vfa_f971c5a_a_e9
script-security:1138.v8e727069a_025
simple-theme-plugin:0.7
slack:2.46
snakeyaml-api:1.29.1
sse-gateway:1.24
ssh-agent:1.23
ssh-credentials:1.19
ssh-slaves:1.33.0
ssh-steps:2.0.0
sshd:3.1.0
stashNotifier:1.20
structs:324.va_f5d6774f3a_d
subversion:2.15.5
throttle-concurrents:2.4
timestamper:1.13
token-macro:267.vcdaea6462991
trilead-api:1.0.13
variant:1.4
vsphere-cloud:2.25
windows-slaves:1.8
workflow-aggregator:2.6
workflow-api:2.47
workflow-basic-steps:2.24
workflow-cps:2633.v6baeedc13805
workflow-cps-global-lib:545.v7b28cce323cf
workflow-durable-task-step:2.40
workflow-job:2.42
workflow-multibranch:2.26
workflow-remote-loader:1.5
workflow-scm-step:2.13
workflow-step-api:2.24
workflow-support:3.8
ws-cleanup:0.39


What Operating System are you using (both controller, and any agents involved in the problem)?

Linux

Reproduction steps

Unfortunately it's difficult to reproduce reliably but is happening more often, possibly because the number of Unit tests is growing.

Expected Results

Tests should be published successfully

Actual Results

Publish NUnit test result report (self time 17s)
Recording NUnit tests results
Error in NUnit processing: Remote call on JNLP4-connect connection from 10.9.25.117/10.9.25.117:49694 failed

Anything else?

Unfortunately I can't provide much more useful information but if you can advise how to get logs or debug information, that would be much appreciated. Thanks

Ensure plugin is compatible `junit-sql-storage-plugin`

What feature do you want to see added?

Ensure the plugin is compatible with https://github.com/jenkinsci/junit-sql-storage-plugin when SQL storage is used.

I think the way action are created from the plugin doesn't consider storage.

Looking at the junit plugin plugin https://github.com/jenkinsci/junit-plugin/blob/65ffcef24a88aa1b16f1ed8610f718d0073d6aa5/src/main/java/hudson/tasks/junit/TestResultAction.java#L89 look if we using some method of TestResultAction only FileJunitTestResultStorage is considered

We need to dig how https://github.com/jenkinsci/junit-plugin/blob/65ffcef24a88aa1b16f1ed8610f718d0073d6aa5/src/main/java/hudson/tasks/junit/pipeline/JUnitResultsStep.java#L216 is implemented to ensure NUnit result converted to JUnit are also using SQL storage when configured

Upstream changes

None. Only on NUnit

Are you interested in contributing this feature?

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.