jenkinsci / multi-module-tests-publisher-plugin Goto Github PK
View Code? Open in Web Editor NEWPlugin to publish junit tests grouped by module name
Home Page: https://plugins.jenkins.io/multi-module-tests-publisher/
Plugin to publish junit tests grouped by module name
Home Page: https://plugins.jenkins.io/multi-module-tests-publisher/
I cannot get the plugin working as I hoped.
My job configuration is:
My project at job level has different modules, my first module is called "ADOS RegressionTest 02.Enform" appearing as a top-level directory in the a job workspace, a JUnit report file is generated for each of module in target/surefire-reports/TEST-TestSuites.xml.
The (quite limited) documentation I found on the plugin homepage @ https://wiki.jenkins-ci.org/display/JENKINS/Multi+Module+Tests+Publisher does not help to figure out how I am supposed to configure the plugin.
Here the stacktrace:
Analyzing test results with ProjectResultPublisher...
ERROR: Publisher com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher aborted due to exception
java.lang.NegativeArraySizeException
at com.cwctravel.hudson.plugins.multimoduletests.junit.io.StringReaderWriter.(StringReaderWriter.java:17)
at com.cwctravel.hudson.plugins.multimoduletests.junit.io.IOUtil.createReaderWriter(IOUtil.java:11)
at com.cwctravel.hudson.plugins.multimoduletests.junit.JUnitParser.characters(JUnitParser.java:266)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characters(AbstractSAXParser.java:538)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:464)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at com.cwctravel.hudson.plugins.multimoduletests.junit.JUnitParser.parse(JUnitParser.java:119)
at com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher$ParseResultCallable.invoke(ProjectResultPublisher.java:240)
at com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher$ParseResultCallable.invoke(ProjectResultPublisher.java:174)
at hudson.FilePath.act(FilePath.java:918)
at hudson.FilePath.act(FilePath.java:896)
at com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher.perform(ProjectResultPublisher.java:122)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1040)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1770)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Finished: FAILURE
I'm trying to configure multiple tests, and didn't find any examples how Module Names should be set up.
In your documentation seems to be a old version, without this field.
https://wiki.jenkins-ci.org/display/JENKINS/Multi+Module+Tests+Publisher
Any advice?
Is it possible? I have a grade project with multiple modules and currently use a script as follows:
invokeGradleTask('testDebugUnitTest', "Test") //this runs all unit tests from both modules
junit '**/build/test-results/testDebugUnitTest/debug/*.xml' //Collect results from all tests in both modules
what I tried:
invokeGradleTask('module-name:testDebugUnitTest', "Test")
step([$class: 'ProjectResultPublisher',
config: [$class : 'ProjectConfiguration',
keepLongStdio : false,
testResultFileMask: 'module-name/build/test-results/testDebugUnitTest/debug/*.xml',
moduleNames : 'module-name']])
The lack of any class implementing SimpleBuildStep
leads me to believe it is not.
As a reference, here is the JUnit results publishing step:
junit(allowEmptyResults: true, testResults: 'results.xml')
[INFO] Reactor Summary:
[INFO]
[INFO] pom ............................................... SUCCESS [14.193s]
[INFO] bus3TestTransactionResources ...................... SUCCESS [27.293s]
[INFO] bus3TestTransactionCore ........................... SUCCESS [54.339s]
[INFO] bus3BeOnline ...................................... SUCCESS [1:57:54.745s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:59:42.661s
[INFO] Finished at: Tue Feb 05 17:05:37 CET 2013
[INFO] Final Memory: 30M/510M
[INFO] ------------------------------------------------------------------------
Ожидаю пока Jenkins закончит сбор данных
channel stopped
Analyzing test results with SuiteTestResultGroupPublisher...
ERROR: Publisher com.cwctravel.hudson.plugins.suitegroupedtests.SuiteGroupResultPublisher aborted due to exception
java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1234)
at java.text.DateFormat.parse(DateFormat.java:335)
at com.cwctravel.hudson.plugins.suitegroupedtests.junit.JUnitParser.parseDate(JUnitParser.java:301)
at com.cwctravel.hudson.plugins.suitegroupedtests.junit.JUnitParser.startElement(JUnitParser.java:168)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.cwctravel.hudson.plugins.suitegroupedtests.junit.JUnitParser.parse(JUnitParser.java:118)
at com.cwctravel.hudson.plugins.suitegroupedtests.SuiteGroupResultPublisher$ParseResultCallable.invoke(SuiteGroupResultPublisher.java:221)
at com.cwctravel.hudson.plugins.suitegroupedtests.SuiteGroupResultPublisher$ParseResultCallable.invoke(SuiteGroupResultPublisher.java:174)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2022)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at hudson.remoting.Engine$1$1.run(Engine.java:60)
at java.lang.Thread.run(Thread.java:662)
Notifying upstream projects of job completion
Finished: FAILURE
Hi I have an error that seems to be from DerbyDB:
Analyzing test results with ProjectResultPublisher...
16:53:45 ERROR: Publisher com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher aborted due to exception
16:53:45 java.io.IOException: java.sql.SQLException: Failed to create database '/root/projects_hudson/_hudson_home/jobs/Project/JUnitDB', see the next exception for details.
16:53:45 at com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher$ParseResultCallable.invoke(ProjectResultPublisher.java:259)
16:53:45 at com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher$ParseResultCallable.invoke(ProjectResultPublisher.java:174)
16:53:45 at hudson.FilePath.act(FilePath.java:981)
16:53:45 at hudson.FilePath.act(FilePath.java:959)
16:53:45 at com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher.perform(ProjectResultPublisher.java:122)
16:53:45 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
16:53:45 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
16:53:45 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
16:53:45 at hudson.model.Build$BuildExecution.post2(Build.java:183)
16:53:45 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
16:53:45 at hudson.model.Run.execute(Run.java:1784)
16:53:45 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
16:53:45 at hudson.model.ResourceController.execute(ResourceController.java:89)
16:53:45 at hudson.model.Executor.run(Executor.java:240)
16:53:45 Caused by: java.sql.SQLException: Failed to create database '/root/projects_hudson/_hudson_home/jobs/Project/JUnitDB', see the next exception for details.
16:53:45 at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknown Source)
16:53:45 at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
16:53:45 at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
16:53:45 at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
16:53:45 at java.sql.DriverManager.getConnection(DriverManager.java:664)
16:53:45 at java.sql.DriverManager.getConnection(DriverManager.java:270)
16:53:45 at com.cwctravel.hudson.plugins.multimoduletests.junit.db.JUnitDB.getConnection(JUnitDB.java:661)
16:53:45 at com.cwctravel.hudson.plugins.multimoduletests.junit.db.JUnitDB.initDB(JUnitDB.java:667)
16:53:45 at com.cwctravel.hudson.plugins.multimoduletests.junit.db.JUnitDB.(JUnitDB.java:768)
16:53:45 at com.cwctravel.hudson.plugins.multimoduletests.ProjectResultPublisher$ParseResultCallable.invoke(ProjectResultPublisher.java:231)
16:53:45 ... 13 more
16:53:45 Caused by: java.sql.SQLException: Failed to create database '/root/projects_hudson/_hudson_home/jobs/Project/JUnitDB', see the next exception for details.
16:53:45 at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
16:53:45 ... 29 more
16:53:45 Caused by: java.sql.SQLException: Supplied territory description 'english' is invalid, expecting ln[_CO[_variant]]
16:53:45 ln=lower-case two-letter ISO-639 language code, CO=upper-case two-letter ISO-3166 country codes, see java.util.Locale.
16:53:45 at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
16:53:45 at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
16:53:45 ... 26 more
16:53:45 Caused by: ERROR XBM0X: Supplied territory description 'english' is invalid, expecting ln[_CO[_variant]]
16:53:45 ln=lower-case two-letter ISO-639 language code, CO=upper-case two-letter ISO-3166 country codes, see java.util.Locale.
16:53:45 at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
16:53:45 at org.apache.derby.impl.services.monitor.BaseMonitor.staticGetLocaleFromString(Unknown Source)
16:53:45 at org.apache.derby.impl.services.monitor.BaseMonitor.setLocale(Unknown Source)
16:53:45 at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
16:53:45 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
16:53:45 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
16:53:45 at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
16:53:45 at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
16:53:45 at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
16:53:45 ... 26 more
It seems the database cannot run because it gets it's Locale with an unexpected territory.
The Jenkins I use is v1.588, it runs on centos 7, but I don't know exactly what java is used. The tomcat jenkins uses has java 1.8, the project is compiled using jdk1.7.0_21(using ant), but I am not certain what java version is used by the job itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.