0

I'm trying to figure out how to Unit Test a login and I'm wondering if testing the login stage would be Unit Testing or Integration Testing?

I've searched to see if there is an example or to see if it is explained but I'm unable to find an answer.

The login stage is just a simple Email and Password to log in with.

1 Answer 1

1

Testing a single login component would be a unit test. Access to any directory or data store should be mocked.

If your test includes a page, a database or directory, or anything else than a single component it's an integration test.

Sign up to request clarification or add additional context in comments.

1 Comment

The way I see it is that a unit test can contain smaller units in it. It's only when you cross the boundaries to an external system (datetime, filesystem, database, etc) that we speak of an integration test.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.