I launched the tests IDE (selenium) from jenkins and I uploaded the XUNIT plugin for having a nice report of test but at the end I obtained this message of ERROR :
Tests failed, see result file for details:
D:\FTP\stm_atos_automatisation\rapports\ff39\rapport_ff39.html ERROR: Build step failed with exception java.lang.NullPointerException: The types section is required.
at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:65)
at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:111)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381) Build step 'Publish xUnit test result report' marked build as failure Finished: FAILURE
Is there any way to solve this problem?
I was getting this error too when I first enabled the XUnit plugin.
I hadn't realized (or had forgotten) that I needed to add a report type to the XUnit build step configuration. To do so, click Add and then select the type of report you want parsed (for me it was PHPUnit-3.x). See this screenshot. You'll also have to specify the path to the XML report files that you want parsed. (I'm using Codeception, so it was tests/_log/*.xml.)
Related
While publishing NUnit report in Jenkin getting an exception "ERROR: Step ‘Publish NUnit test result report’ failed: Could not read the XSL XML file. Please report this issue to the plugin author". I am using
.Net Core MVC App in C#
NUnit project
Jenkin
Using command "dotnet test ".\WebApp2nUnit\WebApp2nUnit.csproj" --logger:"trx;logFileName=Report.xml""
in freestyle jenkin project.
Although build success along with I could see test result report is forming but at the time of publishing this report getting below exception. I am using the NUnit plugin to publish this. Provided is the compete error message:
Test Run Successful.
Total tests: 3
Passed: 3
Total time: 5.3879 Seconds
C:\Program Files (x86)\Jenkins\workspace\WebApp2>exit 0
Recording NUnit tests results
Error in NUnit processing: Could not transform the NUnit report. Please report this issue to the plugin author
ERROR: Step ‘Publish NUnit test result report’ failed: Could not read the XSL XML file. Please report this issue to the plugin author
Finished: FAILURE
Please suggest.
Nishant
I added this package to my solution: https://www.nuget.org/packages/NunitXml.TestLogger/
Then the command used is:
dotnet test folder/project.csproj --filter "TestCategory=category" --results-directory ./folder/ --test-adapter-path:. --logger:"nunit;LogFilePath=TestResult.xml"
and to publish:
nunit testResultsPattern: 'folder/TestResult.xml'
I am getting below error in Anypoint Studio while running or deploying mule application I followed the steps given in the web link of the error but still getting same error.
[ERROR] Unknown lifecycle phase ".m2\repository". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
There are two ways to fix this, either use the Run/Debug configurations, and add the build target there. Or you can specify what maven should use as default settings. (See screenshot for sensible defaults (skip unit tests as they often fail during development) )
I have let gradle generate a gradle app for me (gradle init --type=kotlin-application).
It users kotlin-test (org.jetbrains.kotlin:kotlin-test) as test framework.
However, when I invoke "./gradlew build" and a test fails, I get output where the actual failed test assertion is missing, for example
de.eekboom.eeksv.SimplestTest > testStreaming FAILED
java.lang.AssertionError at SimplestTest.kt:48
5 tests completed, 1 failed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///D:/dev/eeksv/build> /reports/tests/test/index.html
I can of course, open the linked index.html for test results, but that is a bit annoying.
Only when I run that specific test (from within IDEA) I get more helpful output like
expected:<3> but was:<2>
java.lang.AssertionError: expected:<3> but was:<2>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
...
at de.eekboom.eeksv.SimplestTest.testStreaming(SimplestTest.kt:48)
When I use Java and the gradle groovy DSL, I can fix this by configuring the test task:
testLogging {
events TestLogEvent.FAILED // Show specific test failures in output
exceptionFormat = TestExceptionFormat.FULL // Output full failure details
}
How can I do the same for kotlin?
We have CI Bamboo and allure plugin for it.
So, if I set allure version as 1.3.9 - all is Ok, but if version is 1.4.0+, I get error on report's publishing stage (maven step ends successfully):
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.struts.TextProvider] is defined: Unsatisfied dependency of type [interface com.atlassian.struts.TextProvider]: expected at least 1 matching bean
This problem starts after webDriverFactory version increasing or after moving remote agents to a new VM
Allure Bamboo Plugin is not supported well. You can generate report using Allure CLI just as usual build step. And then publish it as regular HTML report.
I use selenium web driver with junit in Eclipse. Advice me please how can I report test results?
I try make it in such way:
http://testerinyou.blogspot.com/2011/03/how-to-create-reports-using-junit.html?showComment=1342535781861#c6211334222001490686
But get errors during gereration:
Buildfile: E:\eclipse\WebDriver\build.xml
build-subprojects:
init:
build-project:
[echo] WebDriver: E:\eclipse\WebDriver\build.xml
[javac] E:\eclipse\WebDriver\build.xml:43: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
build:
Sector:
[mkdir] Created dir: E:\eclipse\WebDriver\junit
[junit] Running Sector
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Test Sector FAILED
junitreport:
[junitreport] Processing E:\eclipse\WebDriver\junit\TESTS-TestSuites.xml to E:\DOCUME~1\CONSUL~1\LOCALS~1\Temp\null255203125
[junitreport] Loading stylesheet jar:file:/E:/eclipse/plugins/org.apache.ant_1.8.2.v20120109-1030/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs /optional/junit/xsl/junit-frames.xsl
[junitreport] : Error! The first argument to the non-static Java function 'replace' is not a valid object reference.
[junitreport] : Error! Cannot convert data-type 'void' to 'reference'.
[junitreport] : Fatal Error! Could not compile stylesheet
[junitreport] Failed to process E:\eclipse\WebDriver\junit\TESTS-TestSuites.xml
BUILD FAILED
E:\eclipse\WebDriver\build.xml:135: Errors while applying transformations: Fatal error during transformation
Total time: 4 seconds
There are different possibilities to create reports for Selenium WebDriver.
A user developed a small library to create a html report with screenshots and so on.
For further information look here: https://github.com/vorburger/webdriver-reporting
Furthermore you could use another framework based on Selenium called Thucydides. It generates really nice looking html-reports and improves Selenium WebDriver. You can visit the official website for more information (www.thucydides.info)
You could use Ant oder TestNG to create a report for your tests.
Look here for more information: http://selftechy.com/2011/06/29/selenium-use-ant-to-generate-html-reports
I like UnitTH to generate test reports.
You can start it via ant or maven
Further questions?