Improve assignment and readme instructions

This commit is contained in:
Adam Klinkosz 2021-04-20 12:02:08 +02:00
parent d85e2fa39a
commit 30933a6d67
2 changed files with 37 additions and 24 deletions

View file

@ -1,9 +1,10 @@
# QA Assignment
## How to start?
1. Follow the instructions in the [readme](readme.md) file.
2. Switch the branch to `cucumber`.
3. Create a pull request with your changes.
1. Fork the project's repository.
2. Follow the instructions in the [readme](readme.md) file.
3. Switch the branch to `cucumber`.
4. Create a pull request with your changes.
## Running tests
You can run the Cucumber features from your IDE or via the command line:
@ -20,6 +21,9 @@ Open the `src/test/resources/scenarios/FindOwners.feature` and follow instructio
### Adding owners
Open `src/test/resources/scenarios/AddOwners.feature` and follow instructions given in the comments.
### Report bugs
Report any found bugs in the best possible format you can think of.
### Bonus tasks
1. The browser doesn't close after all tests. Please fix it.
2. There is something wrong with the way the HTML elements are selected.

View file

@ -1,48 +1,57 @@
# PetClinic Sample Application [![Build Status](https://travis-ci.org/spring-projects/spring-petclinic.png?branch=main)](https://travis-ci.org/spring-projects/spring-petclinic/)
## Running petclinic locally
## About
Petclinic is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built using [Maven](https://spring.io/guides/gs/maven/).
## Prerequisites
The following items should be installed in your system:
* JDK 11 or newer.
* `git` command line tool (https://help.github.com/articles/set-up-git)
* Your preferred IDE
* IntelliJ IDEA
* Eclipse with the m2e plugin. Note: when m2e is available, there is an m2 icon in `Help -> About` dialog. If m2e is
not there, just follow the install process here: https://www.eclipse.org/m2e/
* [Spring Tools Suite](https://spring.io/tools) (STS)
* [VS Code](https://code.visualstudio.com)
## Running petclinic locally
You can build a jar file and run it from the command line:
```
git clone https://github.com/cleankod/spring-petclinic
# Clone the repository (remember to change the URL to your forked one):
git clone git@github.com:cleankod/spring-petclinic.git
# Change working directory to inside the project:
cd spring-petclinic
# Build:
./mvnw package
# Run:
java -jar target/*.jar
```
You can then access petclinic here: http://localhost:8080/
You can then access the application here: http://localhost:8080/
<img width="1042" alt="petclinic-screenshot" src="https://cloud.githubusercontent.com/assets/838318/19727082/2aee6d6c-9b8e-11e6-81fe-e889a5ddfded.png">
Or you can run it from Maven directly using the Spring Boot Maven plugin. If you do this it will pick up changes that you make in the project immediately (changes to Java source files require a compile as well - most people use an IDE for this):
Or you can run it from Maven directly using the Spring Boot Maven plugin. If you do this it will pick up changes that you make in the project immediately
(changes to Java source files require a compilation as well - most people use an IDE for this):
```
./mvnw spring-boot:run
```
## Working with Petclinic in your IDE
### Prerequisites
The following items should be installed in your system:
* JDK 11 or newer.
* `git` command line tool (https://help.github.com/articles/set-up-git)
* Your preferred IDE
* IntelliJ IDEA
* Eclipse with the m2e plugin. Note: when m2e is available, there is an m2 icon in `Help -> About` dialog. If m2e is
not there, just follow the install process here: https://www.eclipse.org/m2e/
* [Spring Tools Suite](https://spring.io/tools) (STS)
* [VS Code](https://code.visualstudio.com)
### Steps:
1) Inside IntelliJ IDEA
In the main menu, choose `File -> Open` and select the Petclinic's [pom.xml](pom.xml). Click on the `Open` button.
1) Inside IntelliJ IDEA, in the main menu, choose `File -> Open` and select the Petclinic's [pom.xml](pom.xml). Click on the `Open` button.
CSS files are generated from the Maven build. You can either build them on the command line `./mvnw generate-resources` or right click on the `spring-petclinic` project then `Maven -> Generates sources and Update Folders`.
CSS files are generated from the Maven build. You can either build them on the command line `./mvnw generate-resources` or right click on the
`spring-petclinic` project then `Maven -> Generates sources and Update Folders`.
A run configuration named `PetClinicApplication` should have been created for you if you're using a recent Ultimate version. Otherwise, run the application by right clicking on the `PetClinicApplication` main class and choosing `Run 'PetClinicApplication'`.
A run configuration named `PetClinicApplication` should have been created for you if you're using a recent Ultimate version. Otherwise, run the application
by right clicking on the `PetClinicApplication` main class and choosing `Run 'PetClinicApplication'`.
2) Navigate to Petclinic