AutoGeneral/IridiumApplicationTesting

Enhancement: remove 'Feature:' line from files being imported

blahDL opened this issue · 3 comments

When importing fragments using #IMPORT: if you remove the Feature line you can then create one feature file that contains a superset of features.

e.g.

  1. logic.path.one.feature (contains tests for one path through the app)
  2. logic.path.two.feature (contains tests for a different path through the app)
  3. logic.feature (imports logic.path.one.feature and logic.path.two.feature to test both paths)

See the testFeatureImport() test in https://github.com/mcasperson/IridiumApplicationTesting/blob/master/src/test/java/au/com/agic/apptesting/LiveTests.java, and the files https://mcasperson.github.io/iridium/features/parent.feature and https://mcasperson.github.io/iridium/features/child.feature.

When importing a feature file, all contents up to the first Scenario is removed.

This will be included with the next release.

I just spent a few hours tracking down why this wasn't working as expected. The reason is windows style line endings \r\n whereas your code only works with unix style line endings \n. After I changed the line endings it worked as expected.