Abstracted instruction based test action methods which can be injected to test runners using local file system and session management.
There are a number of UI test frameworks that attempts to simplify the process of creating test scenarios because a faster tests directly interprets to a faster delivery, but most are either geared towards UI applications or rather still require writing a good amount of scenario steps. This framework helps achieve a low code test workflow by moving all your test actions into a defined set of instructions that can be executed by any test runner in any sequence.
- It's a test lego that actually works
- Complete approach documentation doc.md
- 101 on Medium Post
- Clone project
- Install package dependencies from the root directory
npm install
- Start the UI app with
npm start
- Configure a scenario
- Run tests with command provided in UI or with
npm run test
{
loginToPage: async (request: Record<string, any>) => {
//capture payment process...
//return responses to test session
return {
id: uniqueActionId,
metaData: {}
message: 'Page login successful'
}
}
}
{
"your_app_name": ["loginToPage"]
}
test(`Moduled`, async () => {
//a UI selected array list of preferred actions
const actions = helper.getActions('your_app_name')
for (const element of actions) {
//parse each action array as you defined test methods
const currentAction = helper.translateAction(element)
//fetch existing test session data
const attributes = helper.readTransaction()
//execute each action
const { functionMessage, id, status, appStep } = await helper.executeAction(attributes, currentAction)
//export resolutions to test session
helper.writeTransaction({ id, status, appStep })
//...other extensions: global assertions, reporting...
}
})
- Icons Module icons created by Freepik - Flaticon
- Pictures Unsplash