/test-cafe-study

Primary LanguageJavaScriptMIT LicenseMIT

TestCafe Study Project

This is a TestCafe study project that aims to demonstrate end-to-end testing using TestCafe. It is still a work in progress and serves as a learning tool.

Prerequisites

Before getting started, ensure that you have Node.js installed on your machine. You can download it from the official website: Node.js

Dependencies

The project relies on the following dependencies:

  • TestCafe: a comprehensive end-to-end testing framework for web applications.
  • dotenv: a zero-dependency module for loading environment variables from a .env file.

Installation

  1. Clone the repository:
git clone https://github.com/rapesil/test-cafe-study.git
  1. Install the dependencies:
npm install

Usage

  1. Create a .env file in the project's root directory and define the necessary environment variables. For example:
VALID_USERNAME=standard_user  
USERNAME_BLOCK=locked_out_user  
VALID_PASSWORD=secret_sauce  

I know, the username and password are openly displayed on the test login page, but I want to use .env to provide an example of how to hide sensitive data in my project.

  1. Run the tests:
npm test

This command will execute the TestCafe tests defined in the project.

Contributing

Contributions to this study project are welcome! Feel free to submit bug reports, suggestions, or pull requests.