FtMocks is a Node.js application that will simplify your maintainance of mock data.
- Easy maintanance of mock data for test cases
- Default mock data for all test cases
- Mock server for the test case
To quickly set up a new mock project, install Playwright, and clone & start the ftmocks-server, run:
npx ftmocks init-playwright-allTo quickly set up ftmocks-server, run:
npx ftmocks setup- Please visit FtMocks(www.ftmocks.com)
To run this project, ensure you have the following installed on your machine:
-
Clone the repository:
git clone https://github.com/SodhanaLibrary/ftmocks-server.git
-
Navigate into the project directory:
cd ftmocks-server -
Install dependencies:
npm i
-
Install playwright:
npx playwright install
-
Create my-project.env file for your project
-
Create a my-project.env file in the project root.
MOCK_DIR=./example/my-project/testMockData PORT=5000 PREFERRED_SERVER_PORTS=[4051]
To start the project, use:
npm start my-projectRefer to the ftmocks-utils for detailed API documentation, usage examples, and advanced configuration. This package is essential for wrighting testcases.
Contributions are welcome! Please fork this repository and create a pull request.
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request