Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Pilot integration tests #733

Closed
slaweet opened this issue Sep 12, 2017 · 2 comments
Closed

Pilot integration tests #733

slaweet opened this issue Sep 12, 2017 · 2 comments

Comments

@slaweet
Copy link
Contributor

slaweet commented Sep 12, 2017

Expected behaviour

There are many blog posts out there on how to do integration tests with Mocha and Enzyme
https://engineering.classdojo.com/blog/2017/01/12/integration-testing-react-redux/
https://medium.freecodecamp.org/real-integration-tests-with-react-redux-and-react-router-417125212638

We should try to write some integration tests to evaluate if they offer some benefits. Corrently I can think of these:

  • Can replace some of the e2e tests while being much faster. IMO we still need e2e test for each feature, but maybe not for the edge/error cases, because our e2e suite takes about 4 minutes and is growing with every new feature.
  • Can mock API responses to test API error cases which we cannot test in e2e tests, where we cannot make the server to return an error when we want.

Actual behaviour

We use unit tests and e2e tests, but no integration tests.

@slaweet slaweet added the test label Sep 12, 2017
@willclarktech
Copy link
Contributor

@slaweet One pattern I've seen to make e2e tests more wieldy is to add a @critical tag to the most important scenarios, and run that subset more frequently than the full suite.

@slaweet
Copy link
Contributor Author

slaweet commented Nov 7, 2017

I think a good candidate on the pilot integration test is to write an equivalent of this e2e test:
https://github.com/LiskHQ/lisk-nano/blob/8544afdb93c8870b3480b8b1f61b5faa65c8129e/features/menu.feature#L78-L82

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

No branches or pull requests

3 participants