Question

Can protractor be used for Test Driven Developement ? i want to know whether we can use Protractor for TDD. If yes ,please share an example.

Was it helpful?

Solution

TDD usually refers to unit testing, which can be achieved using Karma. Protractor which wraps Selenium is intended for functional testing - this basically makes sure that the views on your app are working as expected. You wouldn't usually use these kind of tests to drive your development process as they can't test the actual input/output of your methods, which is what you really want to be doing in a TDD workflow.

OTHER TIPS

You can use Protractor to do the end to end testing. That complements the unit testing which is part of the TDD process.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top