Set up the configuration so that it can ask user for below settings when manually triggered:
- User can select either Smoke Test Mode or Acceptance Test Mode.
- When Smoke Test Mode is selected, user can select Component A and/or Component B to test, and can select whether or not to run integration tests.
- When Acceptance Test Mode is selected, user can continue to select Component C and/or Component D to test.
- User can optionally select which test suite to run.
- User can optionally select which test case to run in the selected test suite.
- Open this configuration and hit the run button.
- A build option screen will be presented with desired settings. Make some selection and hit the OK button. Please note that when a test suite is selected, all test cases belonging to that test suite will be displayed for choice.
- Wait for some time for the build to finish. Check the step status screen, and you will find that the test step has been executed on the nodes you specified in the build option screen.
- Open build log and check output of the test step. For demonstration purpose, the specified test setting and its options are printed in the log correctly.
- Create a custom plugin implementing the PromptBeanProvider extension point to provider your own build option bean. You may start with the sample plugin com.example.promptbean in directory <QuickBuild server install dir>/dev/plugin/samples, and modify various bean classes as necessary. Refer to Bean Editor on how to annotate your beans for editing purpose. This tutorial uses the sample plugin directly.
- Stop QuickBuild, deploy your plugin to QuickBuild, and then start QuickBuild. Refer to Plugin Tutorials on how to do this.
- Define a variable with prompt setting set to prompt for bean input, and choose the bean you provided in your plugin. In this tutorial, we choosed the Example Prompt Bean as demonstrated here.
- Please note that we also specified default value of the bean by creating the bean object with groovy, assigning default values to its fields, and convert it to a string. This default bean will be used to populate the variable when the build is not manually triggered (ie. triggered via schedule).
- Definition of the test step retrieves the bean via the variable and traverses the object graph to print interesting information.