Skip to content

Commit

Permalink
improve some test examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed Nov 7, 2023
1 parent 551fdff commit c496f97
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions karate-demo/src/test/java/demo/tags/TagsRunner.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package demo.tags;

import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;

/**
*
* @author peter
*/
class TagsRunner {

@Test
void testParallel() {
Results results = Runner.path("classpath:demo/tags")
.configDir("classpath:demo/tags")
.parallel(1);
assertTrue(results.getFailCount() == 0, results.getErrorMessages());
}

}
2 changes: 1 addition & 1 deletion karate-demo/src/test/java/demo/tags/first.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@smoke
Feature: tags demo - first
run the following example from the command line:
mvn test -Dcucumber.options="--tags @smoke" -Dtest=TagsRunner
mvn test -Dkarate.options="--tags @smoke" -Dtest=TagsRunner

Scenario: f1 - s1
* print 'first feature:@smoke, first scenario'
Expand Down
2 changes: 1 addition & 1 deletion karate-demo/src/test/java/demo/tags/second.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: tags demo - second
run the following example from the command line:
mvn test -Dcucumber.options="--tags @smoke" -Dtest=TagsRunner
mvn test -Dkarate.options="--tags @smoke" -Dtest=TagsRunner

Scenario: f2 - s1
* print 'second feature, first scenario'
Expand Down

0 comments on commit c496f97

Please sign in to comment.