department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 203 forks source link

Evaluate Consumer Driven Contract Testing #3737

Closed alexpappasoddball closed 4 years ago

alexpappasoddball commented 4 years ago

Tons of test on the front end, tons of test on the backend, but no connected tests.

This is reference to: https://app.zenhub.com/workspaces/vsp-5cedc9cce6e3335dc5a49fc4/issues/department-of-veterans-affairs/va.gov-team/1005

alexpappasoddball commented 4 years ago

@annaswims we need to setup some time with @U-DON to talk through this

annaswims commented 4 years ago

I've chatted with Eugene and have some preliminary thoughts (to be continued)

https://github.com/department-of-veterans-affairs/vets-json-schema acts a contract between front end ad back end currently, but it incomplete. It only has schemas for forms. However, we do have many more json schmas in vets-api that can be used as contracts https://github.com/department-of-veterans-affairs/vets-api/tree/master/spec/support/schemas

annaswims commented 4 years ago

PR's for pact proof-of-concept: https://github.com/department-of-veterans-affairs/vets-api/pull/3244/files

https://github.com/department-of-veterans-affairs/vets-website/pull/10970/files

annaswims commented 4 years ago

My opinion: In a lot of ways we're already treating vets-json-schema as a contract between the front end and back end. It's versioned and both the front and back end already have tests that validate against this schema. We could do more work to flesh out this solution and add non-form schemas to vets-json-schema and treat that as our contract.