Commit ae3635b7 authored by dbhuller's avatar dbhuller

adding feature file for calculator tests- add two numbers

parent 1f7285e2
#Tue Apr 06 10:46:18 PDT 2021
gradle.version=6.8.3
<component name="libraryTable">
<library name="Maven: com.google.code.findbugs:jsr305:1.3.9">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.google.errorprone:error_prone_annotations:2.1.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.google.guava:guava:25.0-jre">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/25.0-jre/guava-25.0-jre.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/25.0-jre/guava-25.0-jre-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/25.0-jre/guava-25.0-jre-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.google.j2objc:j2objc-annotations:1.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.squareup.okhttp3:okhttp:3.11.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.11.0/okhttp-3.11.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.11.0/okhttp-3.11.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.11.0/okhttp-3.11.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.squareup.okio:okio:1.14.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.14.0/okio-1.14.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.14.0/okio-1.14.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.14.0/okio-1.14.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: net.bytebuddy:byte-buddy:1.8.15">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/net/bytebuddy/byte-buddy/1.8.15/byte-buddy-1.8.15.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/net/bytebuddy/byte-buddy/1.8.15/byte-buddy-1.8.15-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/net/bytebuddy/byte-buddy/1.8.15/byte-buddy-1.8.15-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.commons:commons-exec:1.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-exec/1.3/commons-exec-1.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-exec/1.3/commons-exec-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.checkerframework:checker-compat-qual:2.0.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-api:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-api/3.141.59/selenium-api-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-api/3.141.59/selenium-api-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-api/3.141.59/selenium-api-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-chrome-driver:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-chrome-driver/3.141.59/selenium-chrome-driver-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-chrome-driver/3.141.59/selenium-chrome-driver-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-chrome-driver/3.141.59/selenium-chrome-driver-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-edge-driver:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-edge-driver/3.141.59/selenium-edge-driver-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-edge-driver/3.141.59/selenium-edge-driver-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-edge-driver/3.141.59/selenium-edge-driver-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-firefox-driver:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-firefox-driver/3.141.59/selenium-firefox-driver-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-firefox-driver/3.141.59/selenium-firefox-driver-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-firefox-driver/3.141.59/selenium-firefox-driver-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-ie-driver:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-ie-driver/3.141.59/selenium-ie-driver-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-ie-driver/3.141.59/selenium-ie-driver-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-ie-driver/3.141.59/selenium-ie-driver-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-java:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-opera-driver:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-opera-driver/3.141.59/selenium-opera-driver-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-opera-driver/3.141.59/selenium-opera-driver-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-opera-driver/3.141.59/selenium-opera-driver-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-remote-driver:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-remote-driver/3.141.59/selenium-remote-driver-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-remote-driver/3.141.59/selenium-remote-driver-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-remote-driver/3.141.59/selenium-remote-driver-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-safari-driver:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-safari-driver/3.141.59/selenium-safari-driver-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-safari-driver/3.141.59/selenium-safari-driver-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-safari-driver/3.141.59/selenium-safari-driver-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.seleniumhq.selenium:selenium-support:3.141.59">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-support/3.141.59/selenium-support-3.141.59.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-support/3.141.59/selenium-support-3.141.59-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/seleniumhq/selenium/selenium-support/3.141.59/selenium-support-3.141.59-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
\ No newline at end of file
...@@ -26,5 +26,25 @@ ...@@ -26,5 +26,25 @@
<orderEntry type="library" scope="TEST" name="Maven: io.cucumber:cucumber-junit:6.8.1" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: io.cucumber:cucumber-junit:6.8.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-chrome-driver:3.141.59" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-api:3.141.59" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-remote-driver:3.141.59" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.8.15" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-exec:1.3" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:25.0-jre" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.0.0" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.11.0" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.14.0" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-java:3.141.59" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-edge-driver:3.141.59" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-firefox-driver:3.141.59" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-ie-driver:3.141.59" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-opera-driver:3.141.59" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-safari-driver:3.141.59" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-support:3.141.59" level="project" />
</component> </component>
</module> </module>
\ No newline at end of file
...@@ -36,6 +36,20 @@ ...@@ -36,6 +36,20 @@
<version>${junit.version}</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.141.59</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package hellocucumber;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
public class AmazonSearchStepDefinitions {
@Given("I navigated to Google")
public void i_navigated_to_google() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}
@When("I searched for Amazon")
public void i_searched_for_amazon() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}
@Then("The result should show Amazon")
public void the_result_should_show_amazon() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}
}
package hellocucumber;
public class Calculator {
private int num1;
private int num2;
public Calculator() {
}
public int add(int arg1, int arg2) {
return arg1 + arg2;
}
public int getTotal() {
return total;
}
private int total;
public int getNum1() {
return num1;
}
public int getNum2() {
return num2;
}
}
package hellocucumber;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import org.junit.Assert;
import static org.junit.Assert.assertEquals;
public class CalculatorStepDefinitions {
private int total;
private Calculator calculator;
@Given("I have a calculator")
public void i_have_a_calculator() throws Throwable {
// Write code here that turns the phrase above into concrete actions
calculator = new Calculator();
}
@When("I add {int} and {int}")
public void i_add_and(int int1, int int2) throws Throwable {
// Write code here that turns the phrase above into concrete actions
total = calculator.add(int1, int2);
}
@Then("The result should be {int}")
public void the_result_should_be(int int1) throws Throwable {
// Write code here that turns the phrase above into concrete actions
assertEquals(int1, total);
}
}
...@@ -5,7 +5,16 @@ import io.cucumber.junit.CucumberOptions; ...@@ -5,7 +5,16 @@ import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(Cucumber.class) @RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty"}) @CucumberOptions(
plugin = {
"pretty",
"html:target/surefire-reports/report.html",
"json:target/surefire-reports/json/report.json",
"junit:target/surefire-reports/junit/report.xml"
},
tags = "@wip" // only runs things with the @wip tag. Can also do "not @wip" for opposite effect
// monochrome = true // console output will keep the same lightened color (including comments)
)
public class RunCucumberTest { public class RunCucumberTest {
} }
Feature: Google
As a user I want to navigate to Google so I can search for Amazon
Scenario: Search Amazon
Given I navigated to Google
When I searched for Amazon
Then The result should show Amazon
\ No newline at end of file
@wip
Feature: Calculator
As a user I want to use a calculator to add two numbers and get a total result
Scenario Outline: Add two number <num1> and <num2>
Given I have a calculator
When I add <num1> and <num2>
Then The result should be <total>
Examples:
| num1 | num2 | total |
| -2 | 3 | 1 |
| 10 | 15 | 25 |
| 99 | -99 | 0 |
| -1 | -10 | -11 |
\ No newline at end of file
hellocucumber/StepDefinitions.class hellocucumber/Calculator.class
hellocucumber/RunCucumberTest.class hellocucumber/AmazonSearchStepDefinitions.class
hellocucumber/IsItFriday.class hellocucumber/CalculatorStepDefinitions.class
/Users/dbhuller/Documents/CucumberDemo/hellocucumber/hellocucumber/src/test/java/hellocucumber/StepDefinitions.java /Users/dbhuller/Documents/CucumberDemo/cucumber-demo/hellocucumber/hellocucumber/src/test/java/hellocucumber/Calculator.java
/Users/dbhuller/Documents/CucumberDemo/hellocucumber/hellocucumber/src/test/java/hellocucumber/RunCucumberTest.java /Users/dbhuller/Documents/CucumberDemo/cucumber-demo/hellocucumber/hellocucumber/src/test/java/hellocucumber/AmazonSearchStepDefinitions.java
/Users/dbhuller/Documents/CucumberDemo/cucumber-demo/hellocucumber/hellocucumber/src/test/java/hellocucumber/StepDefinitions.java
/Users/dbhuller/Documents/CucumberDemo/cucumber-demo/hellocucumber/hellocucumber/src/test/java/hellocucumber/CalculatorStepDefinitions.java
/Users/dbhuller/Documents/CucumberDemo/cucumber-demo/hellocucumber/hellocucumber/src/test/java/hellocucumber/RunCucumberTest.java
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="3" failures="0" name="hellocucumber.RunCucumberTest" time="0.117" errors="0" skipped="0"> <testsuite tests="4" failures="0" name="hellocucumber.RunCucumberTest" time="0.2" errors="0" skipped="0">
<properties> <properties>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/> <property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="java.vm.version" value="15.0.2+7"/> <property name="java.vm.version" value="15.0.2+7"/>
<property name="sun.boot.library.path" value="/usr/local/Cellar/openjdk/15.0.2/libexec/openjdk.jdk/Contents/Home/lib"/> <property name="sun.boot.library.path" value="/usr/local/Cellar/openjdk/15.0.2/libexec/openjdk.jdk/Contents/Home/lib"/>
<property name="maven.multiModuleProjectDirectory" value="/Users/dbhuller/Documents/CucumberDemo/hellocucumber/hellocucumber"/> <property name="maven.multiModuleProjectDirectory" value="/Users/dbhuller/Documents/CucumberDemo/cucumber-demo/hellocucumber/hellocucumber"/>
<property name="java.vm.vendor" value="Oracle Corporation"/> <property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="java.vendor.url" value="https://openjdk.java.net/"/> <property name="java.vendor.url" value="https://openjdk.java.net/"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/> <property name="guice.disable.misplaced.annotation.check" value="true"/>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<property name="user.country" value="US"/> <property name="user.country" value="US"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/> <property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/> <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="/Users/dbhuller/Documents/CucumberDemo/hellocucumber/hellocucumber"/> <property name="user.dir" value="/Users/dbhuller/Documents/CucumberDemo/cucumber-demo/hellocucumber/hellocucumber"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/> <property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="java.runtime.version" value="15.0.2+7"/> <property name="java.runtime.version" value="15.0.2+7"/>
<property name="os.arch" value="x86_64"/> <property name="os.arch" value="x86_64"/>
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
<property name="socksNonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/> <property name="socksNonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
<property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/> <property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
</properties> </properties>
<testcase classname="Is it Friday yet?" name="Today is or is not Friday #1" time="0.112"/> <testcase classname="Calculator" name="Add two number -2 and 3" time="0.163"/>
<testcase classname="Is it Friday yet?" name="Today is or is not Friday #2" time="0.003"/> <testcase classname="Calculator" name="Add two number 10 and 15" time="0.012"/>
<testcase classname="Is it Friday yet?" name="Today is or is not Friday #3" time="0.002"/> <testcase classname="Calculator" name="Add two number 99 and -99" time="0.013"/>
<testcase classname="Calculator" name="Add two number -1 and -10" time="0.012"/>
</testsuite> </testsuite>
\ No newline at end of file
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Test set: hellocucumber.RunCucumberTest Test set: hellocucumber.RunCucumberTest
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.396 sec Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.787 sec
[
{
"line": 2,
"elements": [
{
"start_timestamp": "2021-04-06T20:11:34.964Z",
"line": 12,
"name": "Add two number -2 and 3",
"description": "",
"id": "calculator;add-two-number-\u003cnum1\u003e-and-\u003cnum2\u003e;;2",
"type": "scenario",
"keyword": "Scenario Outline",
"steps": [
{
"result": {
"duration": 2166000,
"status": "passed"
},
"line": 6,
"name": "I have a calculator",
"match": {
"location": "hellocucumber.CalculatorStepDefinitions.i_have_a_calculator()"
},
"keyword": "Given "
},
{
"result": {
"duration": 633000,
"status": "passed"
},
"line": 7,
"name": "I add -2 and 3",
"match": {
"arguments": [
{
"val": "-2",
"offset": 6
},
{
"val": "3",
"offset": 13
}
],
"location": "hellocucumber.CalculatorStepDefinitions.i_add_and(int,int)"
},
"keyword": "When "
},
{
"result": {
"duration": 1176000,
"status": "passed"
},
"line": 8,
"name": "The result should be 1",
"match": {
"arguments": [
{
"val": "1",
"offset": 21
}
],
"location": "hellocucumber.CalculatorStepDefinitions.the_result_should_be(int)"
},
"keyword": "Then "
}
],
"tags": [
{
"name": "@wip"
}
]
},
{
"start_timestamp": "2021-04-06T20:11:35.037Z",
"line": 13,
"name": "Add two number 10 and 15",
"description": "",
"id": "calculator;add-two-number-\u003cnum1\u003e-and-\u003cnum2\u003e;;3",
"type": "scenario",
"keyword": "Scenario Outline",
"steps": [
{
"result": {
"duration": 205000,
"status": "passed"
},
"line": 6,
"name": "I have a calculator",
"match": {
"location": "hellocucumber.CalculatorStepDefinitions.i_have_a_calculator()"
},
"keyword": "Given "
},
{
"result": {
"duration": 308000,
"status": "passed"
},
"line": 7,
"name": "I add 10 and 15",
"match": {
"arguments": [
{
"val": "10",
"offset": 6
},
{
"val": "15",
"offset": 13
}
],
"location": "hellocucumber.CalculatorStepDefinitions.i_add_and(int,int)"
},
"keyword": "When "
},
{
"result": {
"duration": 265000,
"status": "passed"
},
"line": 8,
"name": "The result should be 25",
"match": {
"arguments": [
{
"val": "25",
"offset": 21
}
],
"location": "hellocucumber.CalculatorStepDefinitions.the_result_should_be(int)"
},
"keyword": "Then "
}
],
"tags": [
{
"name": "@wip"
}
]
},
{
"start_timestamp": "2021-04-06T20:11:35.047Z",
"line": 14,
"name": "Add two number 99 and -99",
"description": "",
"id": "calculator;add-two-number-\u003cnum1\u003e-and-\u003cnum2\u003e;;4",
"type": "scenario",
"keyword": "Scenario Outline",
"steps": [
{
"result": {
"duration": 227000,
"status": "passed"
},
"line": 6,
"name": "I have a calculator",
"match": {
"location": "hellocucumber.CalculatorStepDefinitions.i_have_a_calculator()"
},
"keyword": "Given "
},
{
"result": {
"duration": 738000,
"status": "passed"
},
"line": 7,
"name": "I add 99 and -99",
"match": {
"arguments": [
{
"val": "99",
"offset": 6
},
{
"val": "-99",
"offset": 13
}
],
"location": "hellocucumber.CalculatorStepDefinitions.i_add_and(int,int)"
},
"keyword": "When "
},
{
"result": {
"duration": 336000,
"status": "passed"
},
"line": 8,
"name": "The result should be 0",
"match": {
"arguments": [
{
"val": "0",
"offset": 21
}
],
"location": "hellocucumber.CalculatorStepDefinitions.the_result_should_be(int)"
},
"keyword": "Then "
}
],
"tags": [
{
"name": "@wip"
}
]
},
{
"start_timestamp": "2021-04-06T20:11:35.061Z",
"line": 15,
"name": "Add two number -1 and -10",
"description": "",
"id": "calculator;add-two-number-\u003cnum1\u003e-and-\u003cnum2\u003e;;5",
"type": "scenario",
"keyword": "Scenario Outline",
"steps": [
{
"result": {
"duration": 279000,
"status": "passed"
},
"line": 6,
"name": "I have a calculator",
"match": {
"location": "hellocucumber.CalculatorStepDefinitions.i_have_a_calculator()"
},
"keyword": "Given "
},
{
"result": {
"duration": 307000,
"status": "passed"
},
"line": 7,
"name": "I add -1 and -10",
"match": {
"arguments": [
{
"val": "-1",
"offset": 6
},
{
"val": "-10",
"offset": 13
}
],
"location": "hellocucumber.CalculatorStepDefinitions.i_add_and(int,int)"
},
"keyword": "When "
},
{
"result": {
"duration": 311000,
"status": "passed"
},
"line": 8,
"name": "The result should be -11",
"match": {
"arguments": [
{
"val": "-11",
"offset": 21
}
],
"location": "hellocucumber.CalculatorStepDefinitions.the_result_should_be(int)"
},
"keyword": "Then "
}
],
"tags": [
{
"name": "@wip"
}
]
}
],
"name": "Calculator",
"description": " As a user I want to use a calculator to add two numbers and get a total result",
"id": "calculator",
"keyword": "Feature",
"uri": "classpath:hellocucumber/scenario_outline.feature",
"tags": [
{
"name": "@wip",
"type": "Tag",
"location": {
"line": 1,
"column": 1
}
}
]
}
]
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<testsuite errors="0" failures="0" name="io.cucumber.core.plugin.JUnitFormatter" skipped="0" tests="4" time="0.229">
<testcase classname="Calculator" name="Add two number -2 and 3" time="0.058">
<system-out><![CDATA[Given I have a calculator...................................................passed
When I add -2 and 3.........................................................passed
Then The result should be 1.................................................passed
]]></system-out>
</testcase>
<testcase classname="Calculator" name="Add two number 10 and 15" time="0.003">
<system-out><![CDATA[Given I have a calculator...................................................passed
When I add 10 and 15........................................................passed
Then The result should be 25................................................passed
]]></system-out>
</testcase>
<testcase classname="Calculator" name="Add two number 99 and -99" time="0.005">
<system-out><![CDATA[Given I have a calculator...................................................passed
When I add 99 and -99.......................................................passed
Then The result should be 0.................................................passed
]]></system-out>
</testcase>
<testcase classname="Calculator" name="Add two number -1 and -10" time="0.003">
<system-out><![CDATA[Given I have a calculator...................................................passed
When I add -1 and -10.......................................................passed
Then The result should be -11...............................................passed
]]></system-out>
</testcase>
</testsuite>
Feature: Google
As a user I want to navigate to Google so I can search for Amazon
Scenario: Search Amazon
Given I navigated to Google
When I searched for Amazon
Then The result should show Amazon
\ No newline at end of file
@wip
Feature: Calculator
As a user I want to use a calculator to add two numbers and get a total result
Scenario Outline: Add two number <num1> and <num2>
Given I have a calculator
When I add <num1> and <num2>
Then The result should be <total>
Examples:
| num1 | num2 | total |
| -2 | 3 | 1 |
| 10 | 15 | 25 |
| 99 | -99 | 0 |
| -1 | -10 | -11 |
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment