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

Class cast exception: io.restassured.internal.RestAssuredResponseOptionsImpl cannot be cast to io.restassured.response.ResponseOptions #1068

Closed
kubagruszka opened this issue Dec 28, 2017 · 2 comments

Comments

@kubagruszka
Copy link

I'm getting this very strange exception. It happens in a test method which uses the Assume.assumeThat which actually turns false and test should be ignored but it fails on the execution of the @After method call (which one is actually making and http external call to cleanup). What is strange is that Intelij junit runner is actually showing this test as Ignored but Serenity report says ERROR in this post Step.

10:14:55.375 [main] DEBUG net.thucydides.core.steps.StepInterceptor - STEP FAILED: Delete customer {0} - io.restassured.internal.RestAssuredResponseOptionsImpl cannot be cast to io.restassured.response.ResponseOptions

org.junit.AssumptionViolatedException: got: <[null]>, expected: every item is not null


	at net.serenitybdd.junit.runners.SerenityStatement.checkForAssumptionViolations(SerenityStatement.java:59)
	at net.serenitybdd.junit.runners.SerenityStatement.evaluate(SerenityStatement.java:42)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at net.serenitybdd.junit.runners.SerenityRunner.performRunChild(SerenityRunner.java:472)
	at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:447)
	at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:55)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at net.serenitybdd.junit.runners.SerenityRunner.run(SerenityRunner.java:252)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

10:14:55.472 [main] ERROR net.serenitybdd.core.Serenity - 

I have updated serenity and libraries to latest 1.8.12 (from 1.2.2) and explicit rest-assured dependency to 3.0.5 but this exception still happens. Message is quite weird as both classes comes from rest-assured library and RestAssuredResponseOptionsImpl actually implements ResponseOptions so I don't get it :) . Any ideas what can I check more ?

@wakaleo
Copy link
Member

wakaleo commented Jan 6, 2018

Can you provide a sample project that reproduces the issue?

@kubagruszka
Copy link
Author

Currently I'm not able to provide a sample project but we have planned to make it.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants