Code Monkey home page Code Monkey logo

multi-module-tests-publisher-plugin's People

Contributors

luckysimek avatar n360speed avatar szymonfornal-tomtom avatar vimil avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

multi-module-tests-publisher-plugin's Issues

java.lang.NegativeArraySizeException

I cannot get the plugin working as I hoped.
My job configuration is:
image

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

configuration from jenkins file

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.

Add pipeline support

As a reference, here is the JUnit results publishing step:

junit(allowEmptyResults: true, testResults: 'results.xml')

NPE on Analyzing test results with SuiteTestResultGroupPublisher...

[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

Locale error: Supplied territory description 'english' is invalid when the plugin starts Derby DB

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.

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.