How to use Serenity with Junit5?












0















I'm trying to run Serenity Tests in my maven project. I'm using junit-jupiter-engine 5.3.1. (It's in the parent pom.)



I'm getting multiple error.



Is it because the JUnit's version or is there something else?
How can I solve it?



My test class:



@RunWith(SerenityRunner.class)
public class MyTestClass {

private static final String CHARACTER_ENCODING_UTF_8 = "UTF-8";

@Steps
private ApiSteps apiSteps;


@Test
public void aTest() {

try {
String filePath = "initiatepayment/input.xml";

Client client = Client.create();

WebResource webResource = client
.resource("https://jsonplaceholder.typicode.com/posts/42");

// String input = new Scanner(MyTestClass.class.getClassLoader().getResourceAsStream(filePath), CHARACTER_ENCODING_UTF_8).useDelimiter("\A").next();
String input = "{"address": "Budapest"}";

ClientResponse response = webResource.type("application/json")
.get(ClientResponse.class);


System.out.println(response.getStatus());

System.out.println("Output from Server .... n");
String output = response.getEntity(String.class);
System.out.println(output);

} catch (Exception e) {

e.printStackTrace();

}
}

@Test
public void bTest() {
apiSteps.sendGetRequest("https://jsonplaceholder.typicode.com/posts/42", WebResourceType.APPLICATION_XML);
apiSteps.checkStatus(200);
}
}


My child pom.xml's dependencies:



<properties>
<serenity-junit.version>1.8.21</serenity-junit.version>
<serenity.version>1.35.0</serenity.version>
<jersey-client.version>1.19.4</jersey-client.version>
<jersey-common.version>2.22.2</jersey-common.version>
</properties>

<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
</dependency>

<!--Jersey-->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-client.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey-common.version}</version>
<scope>test</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${version.junit-platform-launcher}</version>
<scope>test</scope>
</dependency>

<!--Serenity-->
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity-junit.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-jbehave</artifactId>
<version>${serenity.version}</version>
</dependency>

</dependencies>


My ApiSteps class (It extends BaseSteps class which is empty, but that extends the net.thucydides.core.steps.ScenarioSteps class):



public class ApiSteps extends BaseSteps {

private static final String CHARACTER_ENCODING_UTF_8 = "UTF-8";
private static String message;
private static ClientResponse clientResponse;

@Step
public void getMessageByPath(String filePath) {
message = new Scanner(ApiSteps.class.getClassLoader().getResourceAsStream(filePath), CHARACTER_ENCODING_UTF_8).useDelimiter("\A").next();
}

@Step
public void sendGetRequest(String url, WebResourceType type) {
Client client = Client.create();
WebResource webResource = client.resource(url);
clientResponse = webResource.type(type.getValue()).get(ClientResponse.class);
}

@Step
public void sendPostRequest(String url, WebResourceType type) {
Client client = Client.create();
WebResource webResource = client.resource(url);
clientResponse = webResource.type(type.getValue()).post(ClientResponse.class, message);
}

@Step
public void checkStatus(int expectedStatusCode) {
Assert.assertEquals(clientResponse.getStatus(), expectedStatusCode);
}

}


And my stack trace:



java.lang.Exception: No runnable methods

at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)
at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:128)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:160)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:116)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:100)

....

java.lang.NullPointerException
at com.khb.openapi.payment.web.bdd.MyTestClass.bTest(MyTestClass.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

....


Thank you!










share|improve this question

























  • Hi, you your tests use @RunWith and that is not supported in JUnit5. See baeldung.com/junit-5-runwith

    – David Baak
    Nov 26 '18 at 13:21











  • Thank you! I check it out!

    – pityo10000
    Nov 26 '18 at 13:46
















0















I'm trying to run Serenity Tests in my maven project. I'm using junit-jupiter-engine 5.3.1. (It's in the parent pom.)



I'm getting multiple error.



Is it because the JUnit's version or is there something else?
How can I solve it?



My test class:



@RunWith(SerenityRunner.class)
public class MyTestClass {

private static final String CHARACTER_ENCODING_UTF_8 = "UTF-8";

@Steps
private ApiSteps apiSteps;


@Test
public void aTest() {

try {
String filePath = "initiatepayment/input.xml";

Client client = Client.create();

WebResource webResource = client
.resource("https://jsonplaceholder.typicode.com/posts/42");

// String input = new Scanner(MyTestClass.class.getClassLoader().getResourceAsStream(filePath), CHARACTER_ENCODING_UTF_8).useDelimiter("\A").next();
String input = "{"address": "Budapest"}";

ClientResponse response = webResource.type("application/json")
.get(ClientResponse.class);


System.out.println(response.getStatus());

System.out.println("Output from Server .... n");
String output = response.getEntity(String.class);
System.out.println(output);

} catch (Exception e) {

e.printStackTrace();

}
}

@Test
public void bTest() {
apiSteps.sendGetRequest("https://jsonplaceholder.typicode.com/posts/42", WebResourceType.APPLICATION_XML);
apiSteps.checkStatus(200);
}
}


My child pom.xml's dependencies:



<properties>
<serenity-junit.version>1.8.21</serenity-junit.version>
<serenity.version>1.35.0</serenity.version>
<jersey-client.version>1.19.4</jersey-client.version>
<jersey-common.version>2.22.2</jersey-common.version>
</properties>

<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
</dependency>

<!--Jersey-->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-client.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey-common.version}</version>
<scope>test</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${version.junit-platform-launcher}</version>
<scope>test</scope>
</dependency>

<!--Serenity-->
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity-junit.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-jbehave</artifactId>
<version>${serenity.version}</version>
</dependency>

</dependencies>


My ApiSteps class (It extends BaseSteps class which is empty, but that extends the net.thucydides.core.steps.ScenarioSteps class):



public class ApiSteps extends BaseSteps {

private static final String CHARACTER_ENCODING_UTF_8 = "UTF-8";
private static String message;
private static ClientResponse clientResponse;

@Step
public void getMessageByPath(String filePath) {
message = new Scanner(ApiSteps.class.getClassLoader().getResourceAsStream(filePath), CHARACTER_ENCODING_UTF_8).useDelimiter("\A").next();
}

@Step
public void sendGetRequest(String url, WebResourceType type) {
Client client = Client.create();
WebResource webResource = client.resource(url);
clientResponse = webResource.type(type.getValue()).get(ClientResponse.class);
}

@Step
public void sendPostRequest(String url, WebResourceType type) {
Client client = Client.create();
WebResource webResource = client.resource(url);
clientResponse = webResource.type(type.getValue()).post(ClientResponse.class, message);
}

@Step
public void checkStatus(int expectedStatusCode) {
Assert.assertEquals(clientResponse.getStatus(), expectedStatusCode);
}

}


And my stack trace:



java.lang.Exception: No runnable methods

at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)
at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:128)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:160)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:116)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:100)

....

java.lang.NullPointerException
at com.khb.openapi.payment.web.bdd.MyTestClass.bTest(MyTestClass.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

....


Thank you!










share|improve this question

























  • Hi, you your tests use @RunWith and that is not supported in JUnit5. See baeldung.com/junit-5-runwith

    – David Baak
    Nov 26 '18 at 13:21











  • Thank you! I check it out!

    – pityo10000
    Nov 26 '18 at 13:46














0












0








0








I'm trying to run Serenity Tests in my maven project. I'm using junit-jupiter-engine 5.3.1. (It's in the parent pom.)



I'm getting multiple error.



Is it because the JUnit's version or is there something else?
How can I solve it?



My test class:



@RunWith(SerenityRunner.class)
public class MyTestClass {

private static final String CHARACTER_ENCODING_UTF_8 = "UTF-8";

@Steps
private ApiSteps apiSteps;


@Test
public void aTest() {

try {
String filePath = "initiatepayment/input.xml";

Client client = Client.create();

WebResource webResource = client
.resource("https://jsonplaceholder.typicode.com/posts/42");

// String input = new Scanner(MyTestClass.class.getClassLoader().getResourceAsStream(filePath), CHARACTER_ENCODING_UTF_8).useDelimiter("\A").next();
String input = "{"address": "Budapest"}";

ClientResponse response = webResource.type("application/json")
.get(ClientResponse.class);


System.out.println(response.getStatus());

System.out.println("Output from Server .... n");
String output = response.getEntity(String.class);
System.out.println(output);

} catch (Exception e) {

e.printStackTrace();

}
}

@Test
public void bTest() {
apiSteps.sendGetRequest("https://jsonplaceholder.typicode.com/posts/42", WebResourceType.APPLICATION_XML);
apiSteps.checkStatus(200);
}
}


My child pom.xml's dependencies:



<properties>
<serenity-junit.version>1.8.21</serenity-junit.version>
<serenity.version>1.35.0</serenity.version>
<jersey-client.version>1.19.4</jersey-client.version>
<jersey-common.version>2.22.2</jersey-common.version>
</properties>

<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
</dependency>

<!--Jersey-->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-client.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey-common.version}</version>
<scope>test</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${version.junit-platform-launcher}</version>
<scope>test</scope>
</dependency>

<!--Serenity-->
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity-junit.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-jbehave</artifactId>
<version>${serenity.version}</version>
</dependency>

</dependencies>


My ApiSteps class (It extends BaseSteps class which is empty, but that extends the net.thucydides.core.steps.ScenarioSteps class):



public class ApiSteps extends BaseSteps {

private static final String CHARACTER_ENCODING_UTF_8 = "UTF-8";
private static String message;
private static ClientResponse clientResponse;

@Step
public void getMessageByPath(String filePath) {
message = new Scanner(ApiSteps.class.getClassLoader().getResourceAsStream(filePath), CHARACTER_ENCODING_UTF_8).useDelimiter("\A").next();
}

@Step
public void sendGetRequest(String url, WebResourceType type) {
Client client = Client.create();
WebResource webResource = client.resource(url);
clientResponse = webResource.type(type.getValue()).get(ClientResponse.class);
}

@Step
public void sendPostRequest(String url, WebResourceType type) {
Client client = Client.create();
WebResource webResource = client.resource(url);
clientResponse = webResource.type(type.getValue()).post(ClientResponse.class, message);
}

@Step
public void checkStatus(int expectedStatusCode) {
Assert.assertEquals(clientResponse.getStatus(), expectedStatusCode);
}

}


And my stack trace:



java.lang.Exception: No runnable methods

at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)
at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:128)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:160)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:116)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:100)

....

java.lang.NullPointerException
at com.khb.openapi.payment.web.bdd.MyTestClass.bTest(MyTestClass.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

....


Thank you!










share|improve this question
















I'm trying to run Serenity Tests in my maven project. I'm using junit-jupiter-engine 5.3.1. (It's in the parent pom.)



I'm getting multiple error.



Is it because the JUnit's version or is there something else?
How can I solve it?



My test class:



@RunWith(SerenityRunner.class)
public class MyTestClass {

private static final String CHARACTER_ENCODING_UTF_8 = "UTF-8";

@Steps
private ApiSteps apiSteps;


@Test
public void aTest() {

try {
String filePath = "initiatepayment/input.xml";

Client client = Client.create();

WebResource webResource = client
.resource("https://jsonplaceholder.typicode.com/posts/42");

// String input = new Scanner(MyTestClass.class.getClassLoader().getResourceAsStream(filePath), CHARACTER_ENCODING_UTF_8).useDelimiter("\A").next();
String input = "{"address": "Budapest"}";

ClientResponse response = webResource.type("application/json")
.get(ClientResponse.class);


System.out.println(response.getStatus());

System.out.println("Output from Server .... n");
String output = response.getEntity(String.class);
System.out.println(output);

} catch (Exception e) {

e.printStackTrace();

}
}

@Test
public void bTest() {
apiSteps.sendGetRequest("https://jsonplaceholder.typicode.com/posts/42", WebResourceType.APPLICATION_XML);
apiSteps.checkStatus(200);
}
}


My child pom.xml's dependencies:



<properties>
<serenity-junit.version>1.8.21</serenity-junit.version>
<serenity.version>1.35.0</serenity.version>
<jersey-client.version>1.19.4</jersey-client.version>
<jersey-common.version>2.22.2</jersey-common.version>
</properties>

<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
</dependency>

<!--Jersey-->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-client.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey-common.version}</version>
<scope>test</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${version.junit-platform-launcher}</version>
<scope>test</scope>
</dependency>

<!--Serenity-->
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity-junit.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-jbehave</artifactId>
<version>${serenity.version}</version>
</dependency>

</dependencies>


My ApiSteps class (It extends BaseSteps class which is empty, but that extends the net.thucydides.core.steps.ScenarioSteps class):



public class ApiSteps extends BaseSteps {

private static final String CHARACTER_ENCODING_UTF_8 = "UTF-8";
private static String message;
private static ClientResponse clientResponse;

@Step
public void getMessageByPath(String filePath) {
message = new Scanner(ApiSteps.class.getClassLoader().getResourceAsStream(filePath), CHARACTER_ENCODING_UTF_8).useDelimiter("\A").next();
}

@Step
public void sendGetRequest(String url, WebResourceType type) {
Client client = Client.create();
WebResource webResource = client.resource(url);
clientResponse = webResource.type(type.getValue()).get(ClientResponse.class);
}

@Step
public void sendPostRequest(String url, WebResourceType type) {
Client client = Client.create();
WebResource webResource = client.resource(url);
clientResponse = webResource.type(type.getValue()).post(ClientResponse.class, message);
}

@Step
public void checkStatus(int expectedStatusCode) {
Assert.assertEquals(clientResponse.getStatus(), expectedStatusCode);
}

}


And my stack trace:



java.lang.Exception: No runnable methods

at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)
at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:128)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:160)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:116)
at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:100)

....

java.lang.NullPointerException
at com.khb.openapi.payment.web.bdd.MyTestClass.bTest(MyTestClass.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

....


Thank you!







java junit junit5 serenity-bdd junit-jupiter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 '18 at 13:18







pityo10000

















asked Nov 26 '18 at 12:53









pityo10000pityo10000

85




85













  • Hi, you your tests use @RunWith and that is not supported in JUnit5. See baeldung.com/junit-5-runwith

    – David Baak
    Nov 26 '18 at 13:21











  • Thank you! I check it out!

    – pityo10000
    Nov 26 '18 at 13:46



















  • Hi, you your tests use @RunWith and that is not supported in JUnit5. See baeldung.com/junit-5-runwith

    – David Baak
    Nov 26 '18 at 13:21











  • Thank you! I check it out!

    – pityo10000
    Nov 26 '18 at 13:46

















Hi, you your tests use @RunWith and that is not supported in JUnit5. See baeldung.com/junit-5-runwith

– David Baak
Nov 26 '18 at 13:21





Hi, you your tests use @RunWith and that is not supported in JUnit5. See baeldung.com/junit-5-runwith

– David Baak
Nov 26 '18 at 13:21













Thank you! I check it out!

– pityo10000
Nov 26 '18 at 13:46





Thank you! I check it out!

– pityo10000
Nov 26 '18 at 13:46












1 Answer
1






active

oldest

votes


















0














Unfortunately Serenity is not supported by basic JUnit 5 so I had to use JUnit 5 Vintage only. It can run JUnit 4 tests. It works now.






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53481559%2fhow-to-use-serenity-with-junit5%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Unfortunately Serenity is not supported by basic JUnit 5 so I had to use JUnit 5 Vintage only. It can run JUnit 4 tests. It works now.






    share|improve this answer




























      0














      Unfortunately Serenity is not supported by basic JUnit 5 so I had to use JUnit 5 Vintage only. It can run JUnit 4 tests. It works now.






      share|improve this answer


























        0












        0








        0







        Unfortunately Serenity is not supported by basic JUnit 5 so I had to use JUnit 5 Vintage only. It can run JUnit 4 tests. It works now.






        share|improve this answer













        Unfortunately Serenity is not supported by basic JUnit 5 so I had to use JUnit 5 Vintage only. It can run JUnit 4 tests. It works now.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 '18 at 14:36









        pityo10000pityo10000

        85




        85
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53481559%2fhow-to-use-serenity-with-junit5%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Ottavio Pratesi

            Tricia Helfer

            15 giugno