Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: extend data files #59

Merged
merged 11 commits into from
Jan 15, 2021
Merged

feat: extend data files #59

merged 11 commits into from
Jan 15, 2021

Conversation

ewingjm
Copy link
Member

@ewingjm ewingjm commented Jan 15, 2021

Purpose

Resolves #6. Test projects were becoming very messy due to the amount of data files required (with many having only minor differences). There was also a maintenance headache, as these data files would need to be maintained (e.g. when mandatory fields change) and this effort would be duplicated across all of the files. For example, if I had a data file named an application,json - which I wanted to make a minor adjustment to - I would need to copy everything that's in an application.json into a new file.

Approach

Add a custom build task which processes the data files in a consuming project's 'data' folder. It looks for @extends properties (a relative path - minus extension - to another data file) and then merges these together. In addition, folder hierarchy can now be used to construct the name passed into the data creation bindings. For example:

|_ a record.json
|_ a record/
   |_ with a minor difference.json

Will allow Given I have created 'a record with a minor difference'. This is mostly useful when used in conjunction with @extends.

TODOs

  • Automated test coverage for new code
  • Documentation updated (if required)
  • Build and tests successful

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@ewingjm ewingjm merged commit 771923b into master Jan 15, 2021
@ewingjm ewingjm deleted the feature/extend-data-files branch January 15, 2021 20:43
@sonarcloud
Copy link

sonarcloud bot commented Jan 15, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for multiple possible aliases for test data files
1 participant