Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To activate the allure plugin in Bamboo using bamboo specs code written in Java, follow these steps:

  1. Install the allure plugin in Bamboo.
  2. Configure the plugin by specifying the path to the allure command line executable in the plugin settings.
  3. Write your Bamboo specs code in Java that includes the configuration for the allure plugin.
  4. Use the Bamboo specs API to define the tasks or jobs that will run the tests, such as a Maven or Gradle build task.
  5. In the task configuration, specify the allure plugin as one of the test result parsers. This can be done using the withParseTestResults method.
  6. Save and run the Bamboo plan to execute the tests and generate the allure report.

Here's an example of how to configure the allure plugin in a Bamboo specs code written in Java:

Plan plan = new Plan(createProject("MyProject"), "MyPlan", "My Description");
Job job = plan.addJob("MyJob", "my-agent");

TaskConfiguration taskConfiguration = new TaskConfiguration();
taskConfiguration.withWorkingDirectory("src/test/java");
taskConfiguration.withExecutable(new MavenExecutable().commandLine("clean", "test"));
taskConfiguration.withParseTestResults(new AllureTestResultParser());

job.addTask(new MavenTask(taskConfiguration));

In this example, we're creating a plan and adding a job that will run a Maven test task. The task configuration includes the withParseTestResults method, which specifies the allure plugin as the test result parser.

Once the plan is saved and run, the allure report will be generated and available in the Bamboo build artifacts.