Start single Serenity scenario from command line
up vote
0
down vote
favorite
My team received ownership of a webapp. Tests are written with junit suites and serenity. Good things, there a good test coverage. Problem come when you need to run that single test/scenario that is still failing and you need to wait >30min to run everything.
How can I run a single scenario of this suite using mvn command line?
From code editor, it's hard to start single scenario as both suite and test classes contains important initialization code.
I've also tried argument '-Dtest=T1Test#T1Scenario1' without success.
Code snipplet:
@RunWith(Suite.class)
@Suite.SuiteClasses({
UserConfigASuite.class,
UserConfigBSuite.class,
UserConfigCSuite.class
})
public class AllTestSuite {
}
@RunWith(Suite.class)
@Suite.SuiteClasses({
T1Test.class,
T2Test.class,
//... Lots of other tests
})public class UserConfigASuite {
@BeforeClass
public static void beforeClass() {
//Required init code
}
@AfterClass
public static void afterClass() {
//Cleanup after test suite
}
}
@RunWith(SerenityRunner.class)
public class T1Test {
@Test
@Title("T1: scenario 1")
public void T1Scenario1() {
}
//... Lots of other scenarios
}
java testing junit serenity-js
add a comment |
up vote
0
down vote
favorite
My team received ownership of a webapp. Tests are written with junit suites and serenity. Good things, there a good test coverage. Problem come when you need to run that single test/scenario that is still failing and you need to wait >30min to run everything.
How can I run a single scenario of this suite using mvn command line?
From code editor, it's hard to start single scenario as both suite and test classes contains important initialization code.
I've also tried argument '-Dtest=T1Test#T1Scenario1' without success.
Code snipplet:
@RunWith(Suite.class)
@Suite.SuiteClasses({
UserConfigASuite.class,
UserConfigBSuite.class,
UserConfigCSuite.class
})
public class AllTestSuite {
}
@RunWith(Suite.class)
@Suite.SuiteClasses({
T1Test.class,
T2Test.class,
//... Lots of other tests
})public class UserConfigASuite {
@BeforeClass
public static void beforeClass() {
//Required init code
}
@AfterClass
public static void afterClass() {
//Cleanup after test suite
}
}
@RunWith(SerenityRunner.class)
public class T1Test {
@Test
@Title("T1: scenario 1")
public void T1Scenario1() {
}
//... Lots of other scenarios
}
java testing junit serenity-js
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
My team received ownership of a webapp. Tests are written with junit suites and serenity. Good things, there a good test coverage. Problem come when you need to run that single test/scenario that is still failing and you need to wait >30min to run everything.
How can I run a single scenario of this suite using mvn command line?
From code editor, it's hard to start single scenario as both suite and test classes contains important initialization code.
I've also tried argument '-Dtest=T1Test#T1Scenario1' without success.
Code snipplet:
@RunWith(Suite.class)
@Suite.SuiteClasses({
UserConfigASuite.class,
UserConfigBSuite.class,
UserConfigCSuite.class
})
public class AllTestSuite {
}
@RunWith(Suite.class)
@Suite.SuiteClasses({
T1Test.class,
T2Test.class,
//... Lots of other tests
})public class UserConfigASuite {
@BeforeClass
public static void beforeClass() {
//Required init code
}
@AfterClass
public static void afterClass() {
//Cleanup after test suite
}
}
@RunWith(SerenityRunner.class)
public class T1Test {
@Test
@Title("T1: scenario 1")
public void T1Scenario1() {
}
//... Lots of other scenarios
}
java testing junit serenity-js
My team received ownership of a webapp. Tests are written with junit suites and serenity. Good things, there a good test coverage. Problem come when you need to run that single test/scenario that is still failing and you need to wait >30min to run everything.
How can I run a single scenario of this suite using mvn command line?
From code editor, it's hard to start single scenario as both suite and test classes contains important initialization code.
I've also tried argument '-Dtest=T1Test#T1Scenario1' without success.
Code snipplet:
@RunWith(Suite.class)
@Suite.SuiteClasses({
UserConfigASuite.class,
UserConfigBSuite.class,
UserConfigCSuite.class
})
public class AllTestSuite {
}
@RunWith(Suite.class)
@Suite.SuiteClasses({
T1Test.class,
T2Test.class,
//... Lots of other tests
})public class UserConfigASuite {
@BeforeClass
public static void beforeClass() {
//Required init code
}
@AfterClass
public static void afterClass() {
//Cleanup after test suite
}
}
@RunWith(SerenityRunner.class)
public class T1Test {
@Test
@Title("T1: scenario 1")
public void T1Scenario1() {
}
//... Lots of other scenarios
}
java testing junit serenity-js
java testing junit serenity-js
asked Nov 19 at 15:11
Kbii
8527
8527
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Just confirm first that your using supported surefire and junit version. For more details refer https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
In case your using maven failsafe plugin then the syntax will vary little bit. Something like this
mvn -Dit.test=ITCircle#test* verify
Refer https://maven.apache.org/surefire/maven-failsafe-plugin/examples/single-test.html for more details.
Turn out it was a silly question. Using failsafe, -Dit.test was the right parameter. Thx.
– Kbii
13 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Just confirm first that your using supported surefire and junit version. For more details refer https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
In case your using maven failsafe plugin then the syntax will vary little bit. Something like this
mvn -Dit.test=ITCircle#test* verify
Refer https://maven.apache.org/surefire/maven-failsafe-plugin/examples/single-test.html for more details.
Turn out it was a silly question. Using failsafe, -Dit.test was the right parameter. Thx.
– Kbii
13 hours ago
add a comment |
up vote
1
down vote
accepted
Just confirm first that your using supported surefire and junit version. For more details refer https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
In case your using maven failsafe plugin then the syntax will vary little bit. Something like this
mvn -Dit.test=ITCircle#test* verify
Refer https://maven.apache.org/surefire/maven-failsafe-plugin/examples/single-test.html for more details.
Turn out it was a silly question. Using failsafe, -Dit.test was the right parameter. Thx.
– Kbii
13 hours ago
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Just confirm first that your using supported surefire and junit version. For more details refer https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
In case your using maven failsafe plugin then the syntax will vary little bit. Something like this
mvn -Dit.test=ITCircle#test* verify
Refer https://maven.apache.org/surefire/maven-failsafe-plugin/examples/single-test.html for more details.
Just confirm first that your using supported surefire and junit version. For more details refer https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
In case your using maven failsafe plugin then the syntax will vary little bit. Something like this
mvn -Dit.test=ITCircle#test* verify
Refer https://maven.apache.org/surefire/maven-failsafe-plugin/examples/single-test.html for more details.
answered Nov 22 at 15:06
Satish
320512
320512
Turn out it was a silly question. Using failsafe, -Dit.test was the right parameter. Thx.
– Kbii
13 hours ago
add a comment |
Turn out it was a silly question. Using failsafe, -Dit.test was the right parameter. Thx.
– Kbii
13 hours ago
Turn out it was a silly question. Using failsafe, -Dit.test was the right parameter. Thx.
– Kbii
13 hours ago
Turn out it was a silly question. Using failsafe, -Dit.test was the right parameter. Thx.
– Kbii
13 hours ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53377534%2fstart-single-serenity-scenario-from-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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