AutoGeneral / IridiumApplicationTesting

A&G Web Application Testing Suite
https://www.gitbook.com/book/autogeneral/iridiumapplicationtesting-gettingstartedguide/details
MIT License
20 stars 13 forks source link

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

Closed blahDL closed 7 years ago

blahDL commented 7 years ago

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)
mcasperson commented 7 years ago

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.

blahDL commented 7 years ago

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.

mcasperson commented 7 years ago

Release 0.0.84 addresses the issue with Windows line endings. https://autogeneral.gitbooks.io/iridiumapplicationtesting-gettingstartedguide/content/releases.html