diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..baf8aac65573245caa3b6cacf9df670603338283 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,44 @@ +--- +# Based on the Maven CI/CD template from GitLab: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Maven.gitlab-ci.yml +variables: + # This will suppress any download for dependencies and plugins or upload messages which would clutter the console log. + # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. + MAVEN_OPTS: > + -Dhttps.protocols=TLSv1.2 + -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN + -Dorg.slf4j.simpleLogger.showDateTime=true + -Djava.awt.headless=true + # As of Maven 3.3.0 instead of this, you may define these options in `.mvn/maven.config` so the same config is used + # when running from the command line. + # `installAtEnd` and `deployAtEnd` are only effective with the recent version of the corresponding plugins. + MAVEN_CLI_OPTS: > + --batch-mode + --errors + --fail-at-end + --show-version + -DinstallAtEnd=true + -DdeployAtEnd=true + +stages: + - test + +bdd-test: + stage: test + image: docker.io/markhobson/maven-chrome:jdk-17 + rules: + - allow_failure: true + variables: + APP_URL: https://spring-petclinic-angular.dokku-ppl.cs.ui.ac.id + script: + - mvn clean verify -Dwebdriver.base.url=$APP_URL + cache: + key: + files: + - pom.xml + paths: + - .m2/repository + artifacts: + when: always + paths: + - target/site/serenity \ No newline at end of file diff --git a/pom.xml b/pom.xml index b13b4ea2efd819837deee7a06c8b90c610f66149..e0c60eb845c017be06549591fd64cd037d61941f 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <serenity.version>4.0.15</serenity.version> + <serenity.version>4.0.19</serenity.version> <junit-vintage-engine.version>5.1.0</junit-vintage-engine.version> <junit-platform-suite.version>1.10.0</junit-platform-suite.version> <cucumber-junit-platform-engine.version>7.14.0</cucumber-junit-platform-engine.version> diff --git a/src/test/resources/features/veterinarian/manage_pet_types.feature b/src/test/resources/features/veterinarian/manage_pet_types.feature index 1b87c497b5c7d5ceb760b44e779646a8fecb0ede..ef0202c88a11a9fff54c7d0cc7fb5c8f4c0aabf2 100644 --- a/src/test/resources/features/veterinarian/manage_pet_types.feature +++ b/src/test/resources/features/veterinarian/manage_pet_types.feature @@ -13,4 +13,9 @@ Feature: Manage pet types When she adds a new pet type named "turtle" Then she should see the pet type "turtle" on the list of pet types + Scenario: Add another pet type + Given a system operator named "Jane" is looking at the pet types page + When she adds a new pet type named "hedgehog" + Then she should see the pet type "hedgehog" on the list of pet types + # TODO: Add a scenario to "Edit the last pet type" \ No newline at end of file