HubertArciszewski95 / cypress-realworld-example

Home Page:https://conduit-realworld-example-app.fly.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RealWorld Example App

This is exemplary project of E2E tests written in Cypress + TypeScript, using Page Object Model pattern. Application under test is a Medium.com colne (called Conduit)

Frontend and backend was done by TonyMckes with my little modifications.

  • Reporting: cypress-mochawesome-reporter
  • Visual regression: TODO
  • Continous integration: TODO

Test strategy

Visual documentation of the application most important areas (Conduit mind map).

Condiut mind map

Capability test charters

Before writing any E2E tests, I documented the various capabilities of the application that I plan to cover with tests.


Getting Started

Prerequisites

Before you run the project, make sure that you have the following tools and software installed on your computer:

  • Text editor/IDE (e.g., VS Code, Sublime Text, Atom)
  • Git
  • Node.js v18.11.0+
  • NPM (usually included with Node.js)
  • PostgreSQL

Installation

To install the project on your computer, follow these steps:

  1. Clone the repository to your local machine.

    git clone https://github.com/HubertArciszewski95/cypress-realworld-example.git
  2. Navigate to the project directory.

    cd cypress-realworld-example
  3. Install project dependencies by running the command:

    npm install

Configuration

In the backend directory, duplicate and remane the.env.example file, name it .env, and modify it to set all the required private development environment variables.

You can run the following command to populate your database with test data:

npx -w backend sequelize-cli db:seed:all

If you wish to clean DB from all data:

npx -w backend sequelize-cli db:seed:undo:all

Usage

Development Server

To run the project, follow these steps:

  1. Start the development server by executing the command:

    npm run dev
  2. Open a web browser and navigate to:

Running Tests

To run the tests, run one of the following command:

Headless mode

npm run cy:run

Open cypress UI

npm run cy:open

Specific test suite in headless mode

npm run cy:run --spec "cypress/e2e/path-to-file"

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

https://conduit-realworld-example-app.fly.dev/

License:MIT License


Languages

Language:JavaScript 84.7%Language:TypeScript 13.5%Language:HTML 1.0%Language:CSS 0.8%