stack-spot / stackspot-roadmap

2 stars 0 forks source link

Plugin tests #17

Open MarianaPacheco1 opened 10 months ago

MarianaPacheco1 commented 10 months ago

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

Image