arrow-left

All pages
gitbookPowered by GitBook
1 of 6

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

schedule

week05-project03-test-deploy

Testing and deployment

hashtag
Testing

hashtag
Deployment

project

Your task this week is to deploy and test the quiz app you have completed in the previous two weeks.

hashtag
Description

Before you start you need to create a testing and deployment plan. We would like you plan a testing strategy that will have broad coverage of your project. The tools we would like you to use to achieve this can include Cypress, Postman and the Node built in testing library.

We would like you to deploy both the backend and frontend of your project. Before choosing a deployment platform, consider whether your application is static or dynamic, as this will influence your choice. Here are some options to consider:

  • AWS EC2 Instance

  • AWS Lambda (for serverless applications)

  • Heroku (easy deployment for various application types)

  • GitHub Pages

  • AWS S3 Bucket (suitable for static websites)

  • Vercel

  • Netlify

  • Firebase Hosting (suitable for static and dynamic sites)

  • ...

Research these options and choose the ones that best fit your project's needs, considering factors like scalability, ease of use, and cost. Remember, the goal is to understand the deployment process and the considerations involved in choosing a hosting solution.

hashtag
Questions to consider

  • What parts of the application logic are the most critical to cover with unit tests?

  • How will you mock external dependencies (like databases or APIs) during unit testing?

  • What are the key user journeys and flows within the application that must be covered by end-to-end tests?

hashtag
Acceptance Criteria

hashtag
Stretch criteria

Week of October 7th

This week concentrates on testing and deploying the full-stack quiz application developed over the past two weeks. The focus is on implementing comprehensive testing strategies and successfully deploying both the frontend and backend components of the application.

hashtag
Workshops

resources

hashtag
Cypress

  • hashtag

Understand the process of building and optimizing the application for production (S10, S14, B3)
  • How will you manage test data and state for end-to-end testing?
  • How will encrypted communication (HTTPS) be set up, and will you use a reverse proxy?

  • How will you manage configuration variables for different environments (development, staging, production)?

  • How will CORS policies be configured between the frontend on GitHub Pages and the backend on EC2?

  • hashtag
    Execute Program
    • Finalize incomplete courses

    • SQLarrow-up-right

    hashtag
    Topics

    • Unit testing backend functionality with Node's built-in testing suite

    • API testing with Postman

    • End-to-end testing with Cypress for React applications

    • Component testing in React

    • Writing maintainable and readable test cases

    • Configuring environment variables for different deployment stages

    • Setting up and configuring cloud platforms (AWS EC2)

    • Managing CORS policies in deployed applications

    hashtag
    Stretches

    • Implementing Continuous Integration and Deployment (CI/CD) pipelines

    • Securing applications with HTTPS

    hashtag
    Project

    • Develop a comprehensive testing strategy covering unit, integration, and end-to-end tests

    • Implement tests using Cypress, Postman, and Node's testing library

    • Deploy both the backend and frontend

    • Configure environment variables for different deployment stages

    • Document the setup, deployment process, and usage instructions

    hashtag
    Additional Skills

    • Managing test data and state

    • Implementing reverse proxies

    • Configuring CORS policies

    • Using GitHub Actions for CI/CD

    Persisting data with SQLite and Nodearrow-up-right
    Guide to Component Testing in Cypressarrow-up-right

    A good start in understanding component testing

  • hashtag
    Cypress Functions Cheat Sheetarrow-up-right

    Your one stop shop for example with cypress React

  • hashtag
    Commonly Used Cypress Commandsarrow-up-right

    More generic cheat sheet for Cypress

  • hashtag
    Testing

    • hashtag
      Testing with Cypressarrow-up-right

      Official Cypress docs. You'll find some great tutorials to get start there

    • hashtag

      A short video on how to make collections and writing test in Postman

    hashtag
    DevOps

    • hashtag
      Deploy to an EC2 instancearrow-up-right

      A step by step guide to deploying an express server using the AWS console and SSH

    • hashtag

      Steps to setup HTTPS connections in your Express server

    • hashtag

      The 8 Principles of Secure Development & Deployment set out by the National Cyber Security Center

    Testing with Postmanarrow-up-right
    Create a security certificate for HTTPSarrow-up-right
    National Cyber Security Centerarrow-up-right