Skip to content

christopher-rex/sample-test-pyramid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Test Pyramid

The purpose of this repository is to demonstrate a TestPyramid implementation, with different automated test layers in action. For the purpose of this demonstration, we have built a web application (backed by http services) which is the application under testing.

What is a Test-Pyramid?

Learn from Martin Fowler

Application under test

The application we have is a scaled-down version of shopping-cart which has login and coupon-validation features.

The application itself has two functional components,

  • A web application layer (simply the UI layer) >> Code is in frontend folder
  • A service layer consisting of two micro-services,
    • User service which provides user authentication >> Code is in user_service folder
    • Coupon service which provides coupon validation >> Code is in coupon_service folder

Test layers demonstrated

We have built 4 layers of automated testing. They are,

Start the servers

To start the servers, for convenience, we have added a bash-script up in frontend, user_service, coupon_service folders which will execute the necessary commands to start the corresponding server.

 [sample-test-pyramid/user_service]$ ./up
 [sample-test-pyramid/coupon_service]$ ./up
 [sample-test-pyramid/frontend]$ ./up

Run the tests

For details of how to build or run the tests, refer to the individual README.md files in the corresponding folders,

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published