Hi Marc,

Scripting.exe is not Eclipse RCP app, its a java scripting (javascript)
engine.

The pom I've (or I can change) has ant task to execute this engine (as an
exe).  There are no other java class or test files, so can't use
maven-surefire-plugin.

I need a  way to generate coverage report.  Any suggestions?

Thanks in advance.

Regards
Uma



On Fri, 7 Dec 2018 at 14:20, Marc Hoffmann <[email protected]>
wrote:

> Hi Uma,
>
> so “Scripting.exe” is a Eclipse RCP app?
>
> In this case you need to pass JVM parameters in the following format:
>
> -vmargs ${argLine}
>
> Note the -vmargs prefix. Please see Eclipse RCP documentation how the
> command line works:
>
>
> https://help.eclipse.org/neon/topic/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
>
> Regards,
> -marc
>
>
> On 7. Dec 2018, at 14:30, Uma Lade <[email protected]> wrote:
>
> there is ant <exec> task to run the Java exe file (as you can see from the
> pom).   ${jacoco.agent.argLine} is set as a maven property.  The trick here
> is that there is maven-surefile-plugin or maven-falisafe-plugin being
> called...
>
> Scripting.exe program has the functionality to generate the sure-fire
> reports in the required directory.
>
> Without this maven plugin, jacoco plugin is not getting executed.   I'm
> struggling to find way around this.  Any guidance?
>
>  <argLine>${jacoco.agent.argLine}</argLine>
>
> <exec failonerror="true" dir="${VSA_COM.targetDir}"
> executable="${VSA_COM.targetDir}/Scripting.exe">
>
> <arg line="-script ${project.basedir}/${VSA_SCRIPT_FILE} -argsFile
> ${VSA_SCRIPT_PROPERTY_FILE} ${argLine}" />
>                                                                 </exec>
>
> Thanks
> Uma
>
> On Fri, 7 Dec 2018 at 12:38, Marc Hoffmann <[email protected]>
> wrote:
>
>> How do you start your application under test? At this point you need to
>> provide ${jacoco.agent.argLine} to the JVM running your Eclipse application.
>>
>> Regards,
>> -marc
>>
>> > On 7. Dec 2018, at 12:21, [email protected] wrote:
>> >
>> > I have an eclipse application, there are scripted (*.js) tests which
>> are automated integration tests which are being executed using an .exe
>> file.
>> >
>> > I'll need to do the jacoco coverage for these tests.  How do I achieve
>> that?
>> >
>> > Here is the pom for running the scripted tests.  I included
>> maven-failsafe plugin but doesn't seem to do anything (not getting
>> executed).
>> >
>> > Any advises are greatly appreciated.
>> >
>> > Thanks in advance
>> >
>> >
>> >
>> > <project
>> >       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/xsd/maven-4.0.0.xsd";
>> >       xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance";>
>> >       <modelVersion>4.0.0</modelVersion>
>> >       <prerequisites>
>> >               <maven>3.0</maven>
>> >       </prerequisites>
>> >
>> >       <groupId>com.mentor.vsx</groupId>
>> >       <artifactId>com.mentor.vsx.scriptedTests</artifactId>
>> >       <version>0.1.0-SNAPSHOT</version>
>> >
>> >       <properties>
>> >               <!-- Location of the builds -->
>> >               <!-- ${CM_BRANCH_NAME} examples: "trunk",
>> "VSA2016.1_maint", "VSA2016.2_maint",
>> >                       etc. -->
>> >               <!--  <CM_BRANCH_NAME>trunk</CM_BRANCH_NAME> -->
>> >               <rootDeployLocation>//
>> svr-hub-net-01.hub.mentorg.com/HUB-WKGP/RND/Projects/VSA/Temporary
>> Builds/${CM_BRANCH_NAME}</rootDeployLocation>
>> >               <buildDir>${rootDeployLocation}\VSA_Build\</buildDir>
>> >
>>  <VSA_COM.targetDir>${project.basedir}/target/VSA_COM</VSA_COM.targetDir>
>> >
>>  <VSA_SCRIPT_PARAM_PRE_LOAD_NEEDED>true</VSA_SCRIPT_PARAM_PRE_LOAD_NEEDED>
>> >               <argLine>${jacoco.agent.argLine}</argLine>
>> >       </properties>
>> >       <build>
>> >               <plugins>
>> >                       <plugin>
>> >
>>  <groupId>org.apache.maven.plugins</groupId>
>> >
>>  <artifactId>maven-failsafe-plugin</artifactId>
>> >                               <version>2.17</version>
>> >                               <goals>
>> >                    <goal>integration-test</goal>
>> >                    <goal>verify</goal>
>> >                </goals>
>> >                               <configuration>
>> >
>>  <argLine>${jacoco.agent.argLine}</argLine>
>> >                               </configuration>
>> >                       </plugin>
>> >                       <plugin>
>> >                <groupId>org.jacoco</groupId>
>> >                <artifactId>jacoco-maven-plugin</artifactId>
>> >                <version>0.7.8</version>
>> >                <configuration>
>> >                    <propertyName>jacoco.agent.argLine</propertyName>
>> >                </configuration>
>> >                <executions>
>> >                    <execution>
>> >                        <id>jacoco-initialize</id>
>> >                                               <phase>test</phase>
>> >                        <goals>
>> >                            <goal>prepare-agent</goal>
>> >                        </goals>
>> >                        <configuration>
>> >                                                       <tasks>
>> >                                                               <echo>
>> ${jacoco.agent.argLine} </echo>
>> >                                                       </tasks>
>> >
>>  <dataFile>${project.basedir}/target/jacoco.exec</dataFile>
>> >
>>  <propertyName>jacoco.agent.argLine</propertyName>
>> >                        </configuration>
>> >                    </execution>
>> >                                       <execution>
>> >                                         <id>jacoco-report</id>
>> >                                         <phase>install</phase>
>> >                                         <goals>
>> >                                                <goal>report</goal>
>> >                                         </goals>
>> >                                         <configuration>
>> >
>>  <dataFile>${project.basedir}/target/jacoco.exec</dataFile>
>> >
>>  <outputDirectory>${project.basedir}/target/jacoco/report</outputDirectory>
>> >                                         </configuration>
>> >                                       </execution>
>> >                </executions>
>> >            </plugin>
>> >                       <plugin>
>> >
>>  <groupId>org.apache.maven.plugins</groupId>
>> >
>>  <artifactId>maven-antrun-plugin</artifactId>
>> >                               <version>1.7</version>
>> >                               <executions>
>> >                                       <execution>
>> >
>>  <id>generate-extract-test-resources</id>
>> >
>>  <phase>generate-test-resources</phase>
>> >                                               <configuration>
>> >                                                       <target>
>> >                                                               <taskdef
>> resource="net/sf/antcontrib/antcontrib.properties" />
>> >                                                               <taskdef
>> resource="net/sf/antcontrib/antlib.xml" />
>> >
>>  <loadproperties srcFile="${project.basedir}/test.properties"/>
>> >                                                               <property
>> name="VSA_SCRIPT_PARAM_EXPORT_TG_TDIR" value =
>> "${project.basedir}/target/${EXPORT_TYPE}"/>
>> >                                                               <property
>> name="VSA_SCRIPT_PROPERTY_FILE"
>> value="${VSA_COM.targetDir}/${VSA_SCRIPT_FILE}.properties"/>
>> >
>>  <echo>Getting latest VSA_COM...</echo>
>> >
>>  <timestampselector property="VSA_COM.latest">
>> >
>>  <path>
>> >
>>        <!-- <fileset dir="${buildDir}">
>> >
>>                <include name="**/VSA_COM/*64.zip" />
>> >
>>        </fileset> -->
>> >
>>        <fileset dir="C:\vsa-com-git\vsa\vsa.com
>> \features\com.mentor.vsa.product\target\products">
>> >
>>                <include name="*.zip"/>
>> >
>>        </fileset>
>> >
>>  </path>
>> >
>>  </timestampselector>
>> >                                                               <unzip
>> src="${VSA_COM.latest}" dest="${VSA_COM.targetDir}"
>> >
>>  overwrite="true" />
>> >                                                               <unzip
>> dest="${project.basedir}/arInputFiles">
>> >
>>  <fileset dir="${project.basedir}/arInputFiles">
>> >
>>        <include name="*.zip" />
>> >
>>  </fileset>
>> >                                                               </unzip>
>> >                                                               <replace
>> file="${VSA_COM.targetDir}/Scripting.ini">
>> >
>>  <replacetoken>Xmx8192m</replacetoken>
>> >
>>  <replacevalue>Xmx16000m</replacevalue>
>> >                                                               </replace>
>> >
>>  <propertyfile file="${VSA_SCRIPT_PROPERTY_FILE}">
>> >
>>  <entry key="${EXPORT_TYPE}TgtDir"
>> value="${VSA_SCRIPT_PARAM_EXPORT_TG_TDIR}" />
>> >
>>  <entry key="${EXPORT_TYPE}RefDir" value="${VSA_SCRIPT_PARAM_REF_DIR}" />
>> >
>>  <entry key="serverAddress" value="${VSA_SCRIPT_PARAM_SERVER_ADDRESS}" />
>> >
>>  <entry key="repositoryName" value="${VSA_SCRIPT_PARAM_REPOSITORY_NAME}" />
>> >
>>  <entry key="serverPort" value="${VSA_SCRIPT_PARAM_SERVER_PORT}" />
>> >
>>  <entry key="userName" value="${VSA_SCRIPT_PARAM_USERNAME}" />
>> >
>>  <entry key="password" value="${VSA_SCRIPT_PARAM_PASSWORD}" />
>> >
>>  <entry key="arFilesLocation" value="${project.basedir}/arInputFiles" />
>> >
>>  <entry key="xsdLocation" value="${project.basedir}/xsds" />
>> >
>>  <entry key="JOB_POSTFIX" value="jlr_vsa_19_1_ulade2_autotest" />
>> >
>>  <entry key="CM_BRANCH_NAME" value="${CM_BRANCH_NAME}" />
>> >
>>  <entry key="TestReportDir"
>> value="${project.basedir}/target/surefire-reports" />
>> >
>>  </propertyfile>
>> >                                                               <mkdir
>> dir="${VSA_SCRIPT_PARAM_EXPORT_TG_TDIR}"/>
>> >                                                               <mkdir
>> dir="${project.basedir}/target/surefire-reports"/>
>> >                                                               <exec
>> failonerror="true" dir="${VSA_COM.targetDir}"
>> executable="${VSA_COM.targetDir}/Scripting.exe">
>> >
>>  <arg line="-script ${project.basedir}/${VSA_SCRIPT_FILE} -argsFile
>> ${VSA_SCRIPT_PROPERTY_FILE} ${argLine}" />
>> >                                                               </exec>
>> >                                                       </target>
>> >                                               </configuration>
>> >                                               <goals>
>> >                                                       <goal>run</goal>
>> >                                               </goals>
>> >                                       </execution>
>> >                               </executions>
>> >                               <dependencies>
>> >                                       <dependency>
>> >
>>  <groupId>commons-net</groupId>
>> >
>>  <artifactId>commons-net</artifactId>
>> >
>>  <version>20030805.205232</version>
>> >                                       </dependency>
>> >                                       <dependency>
>> >                                               <groupId>ant</groupId>
>> >
>>  <artifactId>ant-commons-net</artifactId>
>> >                                               <version>1.6.5</version>
>> >                                       </dependency>
>> >                                       <dependency>
>> >                                               <groupId>ant</groupId>
>> >
>>  <artifactId>optional</artifactId>
>> >                                               <version>1.5.4</version>
>> >                                       </dependency>
>> >                                       <dependency>
>> >
>>  <groupId>ant-contrib</groupId>
>> >
>>  <artifactId>ant-contrib</artifactId>
>> >                                               <version>1.0b3</version>
>> >                                               <exclusions>
>> >                                                       <exclusion>
>> >
>>  <groupId>ant</groupId>
>> >
>>  <artifactId>ant</artifactId>
>> >                                                       </exclusion>
>> >                                               </exclusions>
>> >                                       </dependency>
>> >                               </dependencies>
>> >                       </plugin>
>> >               </plugins>
>> >       </build>
>> > </project>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "JaCoCo and EclEmma Users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to [email protected].
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jacoco/838773ca-d5a4-4eed-b4ca-4eec0984e4cc%40googlegroups.com
>> .
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "JaCoCo and EclEmma Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jacoco/WgoEps2M7KA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jacoco/906B9647-7256-43C4-A5A0-C4BD3599B71B%40mountainminds.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/CACFv2wvjOzH0yrJpqYeRvWdt9sko%3DzXa3ML7-Au9tUcsV5h4rw%40mail.gmail.com
> <https://groups.google.com/d/msgid/jacoco/CACFv2wvjOzH0yrJpqYeRvWdt9sko%3DzXa3ML7-Au9tUcsV5h4rw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jacoco/WgoEps2M7KA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/C35906A4-C451-4509-8B06-10CCCCE97905%40mountainminds.com
> <https://groups.google.com/d/msgid/jacoco/C35906A4-C451-4509-8B06-10CCCCE97905%40mountainminds.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/CACFv2wvjnwakw9V3cbVQHo2%3DgQs03g2h%3D0wcUFZ_m_9sDmFs5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to