Package cucumber

Class StepDefs

java.lang.Object
cucumber.StepDefs

public class StepDefs extends Object
This class connects the feature files with the Cucumber test code
  • Constructor Details

    • StepDefs

      public StepDefs()
  • Method Details

    • setUp

      public void setUp()
      This method is called before each test case to set up the test environment
    • test_directories_and_command_arguments

      @Given("the directories {string}, {string}, and command arguments {string}") public void test_directories_and_command_arguments(String inDir, String outDir, String commandArgs)
      This method is called before each test case to set up the test environment
      Parameters:
      inputDirectory - the resource directory
      outputDirectory - the test directory
      commandArgs - the command arguments
    • run_lddtool

      @When("lddtool is run") public void run_lddtool()
      This method is called to run the lddtool command
    • output_should_match_expected_response

      @Then("the produced output from lddtool command should {string} {string} in {string} file") public void output_should_match_expected_response(String assertType, String output, String actualOutputFile)
      This method is called after each test case to compare the actual output with the expected output
      Parameters:
      assertType - the type of assertion to perform
      output - the expected output
      actualOutputFile - the source of the actual output
    • output_should_match_expected_file

      @Then("the contents of file {string} should match {string} except for lines containing comma-separated strings in {string}") public void output_should_match_expected_file(String actualOutputFile, String expectedOutputFile, String excludeStrings) throws IOException
      This method is called after each test case to compare the actual-generated file with the expected file
      Parameters:
      actualOutputFile - the source of the actual output
      expectedOutputFile - the source of the expected output
      excludeStrings - the lines to exclude from the comparison
      Throws:
      IOException
    • exec_lddtool

      public static void exec_lddtool(String commandArgs, String outputDir)
    • tearDown

      public void tearDown()