Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with serenity aggregate with maven #9

Closed
juancamiloau opened this issue Oct 5, 2017 · 2 comments
Closed

Problem with serenity aggregate with maven #9

juancamiloau opened this issue Oct 5, 2017 · 2 comments

Comments

@juancamiloau
Copy link

juancamiloau commented Oct 5, 2017

The execution test is run, the individual report is correct, but the index.html is Empty.
Im executing with mvn verify serenity:aggregate -Dwebdriver.driver=chrome
There is the error:

`[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 28.715 s <<< FAILURE! - in com.choucair.bdd.labjbehave.runners.ClassRunner
[ERROR] Test mechanism  Time elapsed: 27.93 s  <<< ERROR!
java.lang.IllegalStateException: Optional.get() cannot be called on an absent value

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors: 
[ERROR]   Optional.get() cannot be called on an absent value
[INFO]
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[ERROR] There are test failures.

Please refer to D:\Mis documentos\BDD\labjbehave\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
There was an error in the forked process
Test mechanism :: Optional.get() cannot be called on an absent value
org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
Test mechanism :: Optional.get() cannot be called on an absent value
        at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:673)
        at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535)
        at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:280)
        at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
        at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124)
        at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954)
        at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)`

There is my pom.xml

`<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.choucair.bdd</groupId>
	<artifactId>labjbehave</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<serenity.version>1.0.47</serenity.version>
		<serenity.maven.version>1.0.47</serenity.maven.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-core</artifactId>
			<version>1.6.3</version>
		</dependency>
		<dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-junit</artifactId>
			<version>1.6.3</version>
		</dependency>
		<dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-jbehave</artifactId>
			<version>1.30.0</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.8.0-alpha2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.8.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.9.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.6</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.6</version>
		</dependency>
		<dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-rest-assured</artifactId>
			<version>1.6.3</version>
		</dependency>
		<dependency>
			<groupId>com.jayway.restassured</groupId>
			<artifactId>rest-assured</artifactId>
			<version>2.9.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>			
			<plugin>
				<groupId>net.serenity-bdd.maven.plugins</groupId>
				<artifactId>serenity-maven-plugin</artifactId>
				<version>1.5.9</version>
				<executions>
					<execution>
						<id>serenity-reports</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>aggregate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.20.1</version>
				<configuration>
					<testFailureIgnore>true</testFailureIgnore>
					<includes>
						<include>**/runners/**/*.java</include>
					</includes>
					<systemProperties>
						<webdriver.driver>${webdriver.driver}</webdriver.driver>
					</systemProperties>					
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>`
@joeschweikert
Copy link

Were you able to resolve this issue?

@ddbd ddbd closed this as completed May 21, 2018
@ddbd ddbd added the duplicate label May 21, 2018
@ddbd
Copy link
Collaborator

ddbd commented May 21, 2018

Optional.get() cannot be called on an absent value
Could be related to isse #14
but I the crash dump doesn't say anything to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants