Let’s talk about User Interface (UI) testing.
In the “Introduction to testing” article we have covered briefly what UI tests are standing on top of test pyramid. They cover several parts of functionality at once and check how do they work together.
Today we will see them in action.
Last time we have learned about general testing concepts and have talked about unit testing in Elixir.
Now let’s go further and learn how to add tests to Phoenix project.
We will learn how to write tests for Models and Controllers.
Testing is an important part of software development.
One might argue that projects can survive with manual testing only and many of them do.
But that raises a couple of questions:
- How hard is it to refactor some parts in those projects?
- Ain’t one have a fear to refactor the code which uncovered by tests?
- How much time does it take to check the changes one just did?
- Didn’t those changes break some other part of the project?
- How to prove that the code is working as it supposed to work?
Yes, it requires the time to write tests. But does it take less time to test the stuff manually over and over again?
Some time ago we have already mentioned Ecto while we were describing Ecto models.
Ecto quite a big topic, which we cannot cover in a single post.
Today I would like to talk again about Ecto and describe Ecto Queries.