TIBCOSoftware / bw6-plugin-maven

Plug-in Code for Apache Maven and TIBCO ActiveMatrix BusinessWorks™
Other
65 stars 78 forks source link

Enhacement JUnit Support #255

Open alexandrev opened 5 years ago

alexandrev commented 5 years ago

BUG REPORT INFORMATION

Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST --> Maven Plugin version: 2.1.1

Maven version: 3.5.2

Product : TIBCO ActiveMatrix Businessworks

Product version: 6.5.0

Component: Maven Build / Test Plugin

Steps to reproduce the issue:

  1. When you do an mvn test or similar command output should be not only the great HTML page we have now but JUnit file so this could be imported and used in other tools based on that common standard like SonarQube.
ashutoshbhide commented 5 years ago

@alexandrev

After running the maven test goal the the response from the BWEngine is stored in file bwtestreport.xml at location

//target/bwtest/bwtestreport.xml The Site report HTML page is generated from this xml file. You can take a look at this file to see if you have the required data for exporting to SonarCube. If you look at the class /bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/test/rest/BWTestRunner.java here you can find how the report xml is saved. Look at method private void saveReport( CompleteReportDTO resultDTO) If you want to have your own format you can customize it here and use it. Let us know if it works for you. -Ashutosh
alexandrev commented 5 years ago

Hi Ashutosh,

What I'd like to do to be able to have the info imported in sonarqube, is to be abel to export the data in the Surefire format. Please take a look at the format, but this is quite common in java+ maven world.

https://maven.apache.org/surefire/maven-surefire-plugin/

https://docs.sonarqube.org/display/PLUG/Java+Unit+Tests+and+Coverage+Results+Import

Taking a look at the schema: https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd I'm not sure we have all data needed in the report XML file that we're generating at the moment, thats why I'm asking for this enhacement.

Thanks!

On Mon, Mar 4, 2019 at 11:32 AM ashutoshbhide notifications@github.com wrote:

@alexandrev https://github.com/alexandrev

After running the maven test goal the the response from the BWEngine is stored in file bwtestreport.xml at location //target/bwtest/bwtestreport.xml The Site report HTML page is generated from this xml file.

You can take a look at this file to see if you have the required data for exporting to SonarCube.

If you look at the class /bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/test/rest/BWTestRunner.java

here you can find how the report xml is saved. Look at method private void saveReport( CompleteReportDTO resultDTO)

If you want to have your own format you can customize it here and use it.

-Ashutosh

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TIBCOSoftware/bw6-plugin-maven/issues/255#issuecomment-469202507, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5zYQcqzyjWMf-oPN0WwOhWD92wxwGFks5vTPYtgaJpZM4ba3wC .

ashutoshbhide commented 5 years ago

@alexandrev

We have similar though not exact structure. Surefire report mainly deals with Java classes while we deal with Processes so we had to modify the objects accordingly.

To generate with the Surefire test report schema, you will have to first see what is one-2-one mapping of Java Class vs the BW Process and then decide what values to populate there.

So basically you will have to construct your own Java beans corresponding to the xml structure you want to achieve and then marshal that beans to the xml file and then pass that file to Sonarcube plugin.

It will not be that straight forward but it will be doable. But it will require efforts and time.

-Ashutosh