Class RootDirectory

java.lang.Object
net.thucydides.core.requirements.RootDirectory

public class RootDirectory
extends java.lang.Object
Find the root directory of the requirements hierarchy when using Cucumber or JBehave. This is normally src/test/resources/features or src/test/resources/stories. For multi-module projects, it can be a directory with this name in one of the modules. There should only be one requirements directory in a multi-module project. The easiest approach is to have a dedicated module for the acceptance tests.

You can hard-code this directory using serenity.requirements.dir. Milage may vary for multi-module projects. If you need to override the root directory (e.g. to use src/test/resources/myFeatures), a better way is to set the serenity.features.directory (for Cucumber) or serenity.stories.directory (for JBehave) property to the simple name of the directory (e.g. serenity.features.directory=myFeatures).

  • Method Details

    • requirementsDirectoryNames

      public java.util.Set<java.lang.String> requirementsDirectoryNames()
    • definedIn

      public static RootDirectory definedIn​(EnvironmentVariables environmentVariables)
    • getRootDirectoryPaths

      public java.util.Set<java.lang.String> getRootDirectoryPaths()
      Find the root directory in the classpath or on the file system from which the requirements will be read.
    • featureDirectoryName

      public java.lang.String featureDirectoryName()
    • storyDirectoryName

      public java.lang.String storyDirectoryName()
    • featuresOrStoriesRootDirectory

      public java.util.Optional<java.nio.file.Path> featuresOrStoriesRootDirectory()