This repository contains automation scripts for Facebook using Cypress, a powerful testing framework for web applications.
This project aims to automate various interactions on Facebook, including login, posting, and commenting. It serves as a learning resource for using Cypress for end-to-end testing.
Before you begin, ensure you have met the following requirements:
- Node.js installed on your machine (version 12 or above)
- NPM (Node Package Manager)
-
Clone the repository:
git clone https://github.com/hasanazeerkhan/facebook-automation-cypress.git
-
Navigate into the project directory:
cd facebook-automation-cypress
-
Install the required dependencies:
npm install
You can configure the test settings in cypress.json
according to your requirements. The automation scripts are located in the cypress/integration
folder.
To run the tests, you can use the following command:
npx cypress open
This will open the Cypress Test Runner. From there, you can select and run individual test files.
To run all tests in headless mode, use:
npx cypress run
The project structure is as follows:
facebook-automation-cypress/
├── cypress/
│ ├── fixtures/
│ ├── integration/
│ ├── plugins/
│ └── support/
├── cypress.json
└── package.json
- fixtures/: Sample data for testing.
- integration/: Contains the actual test scripts.
- plugins/: Custom plugins for Cypress.
- support/: Custom commands and configurations.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create your feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some feature'
- Push to the branch
git push origin feature/AmazingFeature
- Open a pull request.