Answer the question
In order to leave comments, you need to log in
How to develop an application through testing?
I recently started getting familiar with test-driven development.
I realized that there are 3 types of testing:
acceptance - acceptance testing
functional - functional testing
unit - Unit testing I
started reading the book "Beck - Extreme Programming Development through testing", in general, theoretical knowledge appeared.
Now I would like to start practicing, and here a few questions arise.
First of all, I want to say that I will start working with Yii2 and develop a simple application, for example it will be a simple portfolio site. Most likely, such development is not needed for a simple site consisting of several modules, but I would like to practice and start small.
In yii2 they provided support for testing using codeception , I have already figured out how this thing works, and I'm ready to start. It remains only to get advice on how to do it.
I understand that unit testing is mostly necessary for libraries. For example, if I am faced with the task of implementing 2 modules:
- a user module [authorization, registration, password recovery, profile editing, add delete and change a user in the admin panel]
- and a static page module [show page, add, delete change page in the admin panel]
In fact, here I do not use any of my libraries and I do not need unit tests ( if I'm wrong, please mark ).
As I know, it is necessary to start development with tests, that is, we write a test, it fails, and we write a functional. Based on my task, as I understand it, do I need to use acceptance testing? That is, write a test that would go to the page and register a new user? And only then proceed to the implementation of the functionality?
Answer the question
In order to leave comments, you need to log in
Try programming by design. Everything else is special cases. Draw on paper a diagram of how an application, module or method works. If a section cannot be designed the first time, then you do not know the subject area well, excellent, you need to study it further, study it and return to the site again. Then write tests for each node, then the code itself, or vice versa, whatever is more convenient / faster for you.
theoretical knowledge appeared
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question