A simple and interactive CLI tool to quickly bootstrap a UI + API Cypress test framework with optional Git and GitHub Actions support.
✅ Interactive CLI for easy setup
✅ Ready-made folder structure for UI & API testing
✅ Sample boilerplate tests and page objects
✅ Cypress plugins like XPath, API testing, and HTML reporter
✅ Optional Git and GitHub Actions integration
✅ Beginner-friendly, clean and modular codebase
your-project/
├── cypress/
│ ├── e2e/
│ │ ├── api/ # API tests
│ │ └── ui/
│ │ ├── pages/ # Page Object Model files
│ │ └── tests/ # UI tests
│ ├── fixtures/ # Test data
│ ├── reports/ # Mochawesome reports
│ └── support/ # Cypress support files
├── .github/workflows/ # GitHub CI (optional)
├── .gitignore
├── cypress.config.js # Cypress configuration
├── package.json
⚠️ Important: For installation, use the following command:npx cypress-bootstrapper ```bash npx cypress-bootstrapperDo NOT use
npm i cypress-bootstrapper
as it only installs the package and does not run the setup.
git clone <your-repo-url>
cd <your-folder-name>
Or simply download and extract the files.
npm install
node ./bin/bootstrap.js
You will be prompted for:
- Your application's base URL
- Whether to initialize a Git repo
- Whether to include GitHub Actions CI
# Opens the interactive test runner
npx cypress open
# Runs tests in headless mode
npx cypress run
UI Test
describe('Login UI Test', () => {
it('should login successfully', () => {
loginPage.visit();
loginPage.fillUsername('testuser');
loginPage.fillPassword('password123');
loginPage.submit();
cy.url().should('include', '/dashboard');
});
});
API Test
describe('Login API Test', () => {
it('should return status 200', () => {
cy.api({
method: 'GET',
url: 'api/productsList',
}).then((response) => {
expect(response.status).to.eq(200);
});
});
});
-
cypress-plugin-api
– API testing helper -
cypress-xpath
– XPath support for selectors -
cypress-mochawesome-reporter
– HTML reporting -
faker
– Test data generator
If enabled during setup, a .github/workflows/ci.yml
file will be created to automatically run Cypress tests on every push or pull request to main
.
If needed, you can remove or customize:
- Boilerplate tests in
cypress/e2e/
- Sample commands in
support/commands.js
- CI workflow under
.github/workflows/
Contributions are welcome! You can fork this tool, extend it with new prompts, or add more templates like TypeScript or Docker support.
MIT – free for personal and commercial use.
Feel free to open an issue or reach out via the project's discussion tab!