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

Difference between Unit and Integration Tests? #126

Open
3 tasks
nelsonic opened this issue Jul 30, 2019 · 0 comments
Open
3 tasks

Difference between Unit and Integration Tests? #126

nelsonic opened this issue Jul 30, 2019 · 0 comments

Comments

@nelsonic
Copy link
Member

A unit test exercises a function for one layer of your application. For example, if you’re testing a web calculator, unit tests would exercise the Calculator module supporting your arithmetic. You might dedicate one or more tests to the add function on your calculator module.

An integration test focuses on the way different layers of an application fit together. Our integration tests in this chapter will generally do a request to a controller to use the things we’ve created so far. A single test will begin at our endpoint, run through our pipelines, read from the database, and render templates through views just as Phoenix requests would.

from p.146 of Programming Phoenix 1.4.

Todo

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

No branches or pull requests

1 participant