This project is designed to test QRDA Category I XML files using Cypress. It includes fixtures, tests, and instructions for validating the structure and content of QRDA XML files.
Follow these instructions to clone the project and run the tests on your local machine.
Ensure you have the following installed:
-
Node.js (version 14 or higher)
Download: https://nodejs.org/ -
Git
Download: https://git-scm.com/ -
Cypress
Cypress will be installed vianpm
during setup.
Use the following command to clone the repository:
git clone https://github.com/junaid-ahmad/cypress-qrda-test.git
Navigate to the project directory:
cd cypress-qrda-test
Install the required npm
packages:
npm install
To open the Cypress UI and run tests interactively, use:
npx cypress open
To run the tests in the terminal (headless mode), use:
npx cypress run
-
Fixtures:
cypress/fixtures/qrda_category1.xml
— Sample QRDA Category I XML file. -
Test File:
cypress/e2e/qrda_category1_spec.cy.js
— Cypress test to validate the QRDA XML.
To test with a different QRDA Category I XML file:
- Place your XML file in the
cypress/fixtures
folder. - Update the test file
cypress/e2e/qrda_category1_spec.cy.js
to reference your new fixture.
Example:
cy.fixture('your_new_file.xml').then((xmlData) => {
// Your test code here
});
-
Cypress Not Found:
Ensure all dependencies are installed withnpm install
. -
Port Conflicts:
Cypress might use a default port; close any applications using port3000
or configure Cypress to use a different port. -
Permission Issues:
Run commands with appropriate permissions (usesudo
if necessary).
If you'd like to contribute to this project, feel free to submit issues or pull requests.
This project is licensed under the MIT License.
For any questions or issues, reach out to:
- Email: [email protected]
- GitHub: Your GitHub Profile
Happy Testing! 🧪🚀