Class VariableHelper

java.lang.Object
org.chenile.cucumber.VariableHelper

public class VariableHelper extends Object
Class manages the variables that are set and used in Cucumber test cases. Contains Variable substitution helper methods
  • Field Details

    • varMap

      private static final Map<String,String> varMap
      Uses a variable to store the results of a scenario so that it can be used in the next scenario.
      For example, if we create an entity and want to retrieve the same entity by ID, then we can store the ID as a variable in the varMap. We can use the ID to retrieve the object back in the next scenario
      varMap spans scenarios and hence needs to be stored outside the context.
  • Constructor Details

    • VariableHelper

      public VariableHelper()
  • Method Details

    • put

      public static void put(String name, String value)
    • substituteVariables

      public static String substituteVariables(String s)