aptos-atap-core
v1.23.0
Published
This is a TypeScript-based test automation framework designed to facilitate BDD-style testing using Cucumber. The framework supports loading test data and configuration from external JSON files, allowing for flexible parallel test execution.
Downloads
3,714
Readme
Test Automation Framework
This is a TypeScript-based test automation framework designed to facilitate BDD-style testing using Cucumber. The framework supports loading test data and configuration from external JSON files, allowing for flexible parallel test execution.
Features
- Observer Pattern: Utilize the Observer Pattern to manage the status of test data and configurations.
- Shared & Exclusive Access: Handle both shared and exclusive access to test data and configuration settings.
- Dynamic Data Loading: Load test data and configurations from external JSON files.
- Easy Integration: User-friendly command-line interface for creating new projects and initializing test setups.
Prerequisites
- Node.js (v14 or later)
- NPM (Node Package Manager)
Installation
To set up and use this framework, follow these steps:
Clone the Repository:
git clone https://github.com/yourusername/your-repo-name.git cd your-repo-name
Install Dependencies:
npm install
Build the Project:
npm run build
Usage
Create Framework Command
You can create a new project directory and initialize the framework structure using the following command:
npx create-framework init <project-name>
This command creates a new directory called with all necessary folders and essential files for the test automation setup. To initialize the framework in the current directory, simply use:
npx create-framework init
Running the Tests
Once you've set up your project and populated the test data and configuration files, you can run your tests using Node.js:
node dist/index.js
Data Management
Test data and configuration data can be managed programmatically or by loading from JSON files located in the src/data/ directory. The framework is designed to read from these files and manage data in memory.
Running
Template Generator:
npx create-framework init [projectname]
Normal Run:
npm start -- --tags "@demo" ENV=qa npm start -- --tags "@demo" BROWSERS=chrome npm start -- --parallel 2 --tags "@demo" npm start -- --world-parameters '{"browserName":"safari"}' --tags "@demo" RUNNER=lambdatest LT_USERNAME=vishnu.nallaniaptos LT_ACCESSKEY=wmmvneB7fRCo3oy9VkhcoSVYrj6excNTr4Catf5PFA0Eikopfn npm start -- --tags "@demo"
Parallel:
npm run test:parallel --tags "@demo"
BROWSERS=chrome,safari npm run test:parallel -- --tags "@demo"
Devices:
RUNNER=lambdatest LT_USERNAME=vishnu.nallaniaptos LT_ACCESSKEY=wmmvneB7fRCo3oy9VkhcoSVYrj6excNTr4Catf5PFA0Eikopfn OS=android npm start -- --tags "@mobile"
RUNNER=lambdatest LT_USERNAME=vishnu.nallaniaptos LT_ACCESSKEY=wmmvneB7fRCo3oy9VkhcoSVYrj6excNTr4Catf5PFA0Eikopfn OS=android npm run test:parallel -- --tags "@mobile"