Skip to content

Commit

Permalink
Migrated the default output directory to target/site/serenity
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo committed Jan 18, 2015
1 parent 97156bd commit 82b9866
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public abstract class HtmlReporter extends ThucydidesReporter {

private static final String DEFAULT_RESOURCE_DIRECTORY = "report-resources";
private static final String DEFAULT_SOURCE_DIR = "target/site/thucydides";
private static final String DEFAULT_SOURCE_DIR = "target/site/serenity";
private String resourceDirectory = DEFAULT_RESOURCE_DIRECTORY;
private final TemplateManager templateManager;
private final EnvironmentVariables environmentVariables;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class SystemPropertiesConfiguration implements Configuration {
/**
* By default, reports will go here.
*/
private static final String DEFAULT_OUTPUT_DIRECTORY = "target/site/thucydides";
private static final String DEFAULT_OUTPUT_DIRECTORY = "target/site/serenity";

/**
* HTML and XML reports will be generated in this directory.
Expand Down Expand Up @@ -124,9 +124,9 @@ private String getMavenBuildDirectory() {
String mavenReportsDirectory = getEnvironmentVariables().getProperty(MAVEN_REPORTS_DIRECTORY);
String defaultMavenRelativeTargetDirectory = null;
if (StringUtils.isNotEmpty(mavenReportsDirectory)) {
defaultMavenRelativeTargetDirectory = mavenReportsDirectory + "/thucydides";
defaultMavenRelativeTargetDirectory = mavenReportsDirectory + "/serenity";
} else if (StringUtils.isNotEmpty(mavenBuildDirectory)) {
defaultMavenRelativeTargetDirectory = mavenBuildDirectory + "/site/thucydides";
defaultMavenRelativeTargetDirectory = mavenBuildDirectory + "/site/serenity";
}
return defaultMavenRelativeTargetDirectory;
}
Expand Down Expand Up @@ -163,7 +163,7 @@ public void setOutputDirectory(final File outputDirectory) {

/**
* The output directory is where the test runner writes the XML and HTML
* reports to. By default, it will be in 'target/site/thucydides', but you can
* reports to. By default, it will be in 'target/site/serenity', but you can
* override this value either programmatically or by providing a value in
* the <b>thucydides.output.dir</b> system property.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class WhenGeneratingAggregateHtmlReports extends Specification {
WebDriver driver;

def setup() {
outputDirectory = new File(temporaryDirectory,"target/site/thucydides")
outputDirectory = new File(temporaryDirectory,"target/site/serenity")
outputDirectory.mkdirs()
reporter.outputDirectory = outputDirectory;
environmentVariables.setProperty("output.formats","xml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public void setupEnvironment() {
public void the_default_output_directory_is_in_the_default_maven_site_directory() {
File outputDirectory = configuration.getOutputDirectory();

assertThat(outputDirectory.getPath(), is(changeSeparatorIfRequired("target/site/thucydides")));
assertThat(outputDirectory.getPath(), is(changeSeparatorIfRequired("target/site/serenity")));
}

@Test
public void the_default_output_directory_can_be_overriden_if_the_maven_output_directory_is_overridden() {
environmentVariables.setProperty("project.build.directory","build");
File outputDirectory = configuration.getOutputDirectory();

assertThat(outputDirectory.getPath(), is(changeSeparatorIfRequired("build/site/thucydides")));
assertThat(outputDirectory.getPath(), is(changeSeparatorIfRequired("build/site/serenity")));
}

@Test
Expand Down
1 change: 1 addition & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Deprecate Thucydides versions, but still handle them correctly
## Chores
- Automated the generation of the release notes from the git commits
## Miscellaneous
- Added support for better Cucumber reporting
- Updated release notes
- Restored release notes
- Make sure the release notes are produced dynamically
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class SerenityReportingTask extends Task {
*/
public String jiraProject;

private final String DEFAULT_SOURCE = "target/site/thucydides";
private final String DEFAULT_SOURCE = "target/site/serenity";

private PathProcessor pathProcessor = new PathProcessor();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.serenitybdd.plugins.gradle

class SerenityPluginExtension {
def String outputDirectory = 'target/site/thucydides'
def String outputDirectory = 'target/site/serenity'
def String projectKey
def String issueTrackerUrl
def String jiraUrl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class WhenUsingTheGradlePlugin extends Specification {
project.apply plugin: 'java'
project.apply plugin: 'net.serenity-bdd.aggregator'
then:
project.serenity.outputDirectory == 'target/site/thucydides'
project.serenity.outputDirectory == 'target/site/serenity'
}

def "should add the checkOutcomes task to a project"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class WhenGeneratingThucydidesReports extends Specification {
}

def thucydidesReportsShouldHaveBeenGenerated() {
def outputDirectory = new File("target/site/thucydides")
def outputDirectory = new File("target/site/serenity")
def reportFile = new File(outputDirectory, latestTestOutcomes[0].htmlReport)
assert reportFile.exists()
}
Expand Down

0 comments on commit 82b9866

Please sign in to comment.