Demo-Site
A site I use for various demonstrations of common test automation problems.
Setup
It's kludgy ATM.
- Update SQL connection string in Demo-Site/SupportApi/DataHelpers.cs
- Update SQL connection string in Demo-Site/WebApi/Web.config
- Update targetString in Demo-Site/Scripts/appConfig.js
- Run CreateDB.sql
- Run CreateContacts.sql
- Run InsertContacts.sql
Add site as an app in IIS. Check the usual tomfoolery around the site's app pool ID account having access to the database.
Overview
UI for testing
WebApi/Views/Home/Index uses a Telerik grid to render contacts WebApi/KendoGrid uses a Kendo Grid to render contacts. Supports edit and create.
Services API
REST services are exposed out via WebApi for regular PUT/POST/GET stuff (used by both grids above).
There's a WCF service for SOAP endpoint testing.
Backing API
SupportApi project is a start on demoing how to use a backing API to help make functional testing easier.
Testability
WebApi/KendoGrid-*.html are progressive files meant to show how to make the system more testable.
- Grid-1 is default Kendo grid. Look at dynamic IDs on table.
- Grid-2 adds a Create button to make new contacts.
- Grid-3 changes grid IDs so they're unique with the row number. Not the best.
- Grid-4 changes IDs so they are DB ID + last name.
- KendoGrid.html is the final piece that shows all things together. Additionally it writes to the element after each type response from editing, creating, etc. This makes a "latch" you can use for asynch waits: Simply wait on the element to update with the response type you're looking for. See line 23.