Upon completing this story, content creators will have the possibility to test our plugins created to validate the generated templates.
Intended Outcome
The successful implementation of this user story will allow customers to create test cases, exclusively for plugin where it is possible to insert the project content into the target folder, simulating the application of the plugin in projects that were not also created with StackSpot, thus ensuring full coverage of generated templates.
How It Will Work
To add test cases to an existing plugin, the user must follow the following steps:
1 - Create folder in the plugin root;
2 - Create subfolder that contains the test scenario name;
3 - Create the following items in the subfolder:
Expected folder: folder that contains the expected files to validate the plugin application.
Target folder: folder that contains an app/infra, in which the plugin will be applied.
test-case.yaml file: file that contains the test case manifest (inputs, inputs-envs, required connection, generated connection)
4 - Execute the test cases with the stk test plugin command.
You can run the tests in the following ways:
stk test plugin: Will execute all test scenarios in apply and deploy with the exception of ignored scenarios.
stk test plugin : Will execute the test scenario that contains the name entered.
stk test plugin --mode apply: Will run all test scenarios in apply mode with the exception of ignored scenarios.
stk test plugin --mode deploy: Will run all test scenarios in deploy mode with the exception of ignored scenarios.
Description
Upon completing this story, content creators will have the possibility to test our plugins created to validate the generated templates.
Intended Outcome
The successful implementation of this user story will allow customers to create test cases, exclusively for plugin where it is possible to insert the project content into the target folder, simulating the application of the plugin in projects that were not also created with StackSpot, thus ensuring full coverage of generated templates.
How It Will Work
To add test cases to an existing plugin, the user must follow the following steps: 1 - Create folder in the plugin root;
2 - Create subfolder that contains the test scenario name;
3 - Create the following items in the subfolder:
Expected folder: folder that contains the expected files to validate the plugin application.
Target folder: folder that contains an app/infra, in which the plugin will be applied.
test-case.yaml file: file that contains the test case manifest (inputs, inputs-envs, required connection, generated connection)
4 - Execute the test cases with the stk test plugin command.
You can run the tests in the following ways:
Preview Feature