Clone or download
g33klady Update README.md
added notes about automated tests in various branches; rearranged to make it more clear what is needed for each workshop
Latest commit a1801a5 Oct 10, 2018
Permalink
Failed to load latest commit information.
TodoApi added some metadata to controller, removed unused usings, updated err… Aug 19, 2018
TodoApiTests fixed namespace issue with utilities Jun 26, 2018
.dockerignore
.gitattributes Add .gitignore and .gitattributes. Jun 3, 2018
.gitignore Add .gitignore and .gitattributes. Jun 3, 2018
README.md Update README.md Oct 10, 2018
Testing RESTful Web Services_workshopKCDC.pptx Adding slides from KCDC workshop Jul 12, 2018
ToDo API.postman_collection.json added postman collection Jun 30, 2018
TodoApi.sln docker for windows setup Aug 7, 2018
docker-compose.dcproj docker for windows setup Aug 7, 2018
docker-compose.override.yml docker for windows setup Aug 7, 2018
docker-compose.yml docker for windows setup Aug 7, 2018
package-lock.json now require a header for all requests which the UI auto generates Aug 11, 2018

README.md

Testing RESTful Web Services 1/2 Day Workshop Code & Resources

Prerequisites

For this workshop, you need the following knowledge:

  • 101 level knowledge of C#
  • 101 level Git knowledge (to manage with the repo and branches)

This workshop requires the following:

Have Some Cake With Your Frosting: Testing The UI and API Layers

Prerequisites

For this workshop, no prior knowledge is required. However, the following are required to be installed:

Resources

Some resources mentioned or useful during the workshop:

To Use This Application In Docker

The application can also be used in Docker, for instance for the Workshop "Have Some Cake With Your Frosting"

  • Install and setup Docker (https://www.docker.com/community-edition)
  • If using Docker on Windows, set Docker to use Linux Containers - either during installation or by right-clicking on the Docker icon in the system tray and choosing Switch to Linux Containers (you can switch back after the workshop)
  • Verify your installation (https://docs.docker.com/get-started/#test-docker-installation)
  • Run the following command from a command line anywhere on your computer docker run -p 8080:80 --name myapp g33klady/todoapi:latest This will get the latest docker image with this code running on your machine

To see what is running in Docker Docker ps

To stop a Docker image Docker stop myapp

To start a Docker image back up Docker start myapp

Once Docker is running, application can be accessed: http://localhost:8080

Note

You'll need to provide a header with key "CanAccess" and value "true" to use the API via Postman. When using the Swagger specification, select the Authorization button and enter the value "true".

Automated Test Samples

To view some automated tests written in C#, review the branch "Exercise 5". To view the above automated tests using RestSharp, review the branch "RestSharp".