6 concepts in one article take you successfully into automated testing

Automated testing has the following concepts:

  1. unit test
  2. Integration Testing
  3. E2E testing
  4. snapshot test
  5. test coverage
  6. TDD and BDD etc.

brief description

There will be several experiences during the project development process.

  1. Before the version is released and goes online, it will take several hours or even longer to test the application. This process is very boring and painful.
  2. When the complexity of the code reaches a certain level, when the number of maintainers is more than one, you should gradually notice that you will become more cautious when developing new features or fixing bugs, even if the code seems to be fine, but You will still be wondering in your heart: Will it cause other bugs.
  3. When refactoring the code in the project, a lot of time will be spent on regression testing

These problems are caused by most of the most basic manual testing methods, which can be solved by introducing automated testing methods.

In our daily development, the completion of the code does not actually mean the completion of the development. Without testing, there is no guarantee that the code will work correctly.

How to do application testing?

  • Manual Testing: Checks that it is working properly through the interaction of the tester with the application.
  • Automated testing: Writing applications to replace manual inspection.

manual testing

Developers know how to manually test code. After writing the source code, the next logical step is to test it manually.

The advantage of manual testing is that it is simple and flexible enough, but the disadvantages are also obvious:

  • Manual is not suitable for large projects
  • Forgot to test a feature
  • Doing regression testing most of the time

While some of the manual testing time is spent testing new features, most of the time is spent checking that previous features still work. This kind of testing is called regression testing . Regression tests are very difficult tasks for humans - they are repetitive, require a lot of attention, and have no creative input. In short, this kind of test is too boring. Fortunately, computers are very good at this kind of work, and this is where automated testing can come in handy!

automated test

Automated testing is a testing method that uses computer programs to check that software is functioning properly. In other words, the code of the software under test is checked with other additional code. Once the test code is written, it can be repeated countless times without breaking a sweat.

Automated test scripts can be written in a number of different ways:

  • Can write programs that execute automatically through the browser
  • You can directly call the function in the source code
  • You can also directly compare the screenshots after program rendering

The advantages of each approach are different, but they all have one thing in common: significant time savings compared to manual testing and increased program stability.

There are many advantages of automated testing, such as:

  • Find program bugs and deficiencies as early as possible
  • Enhance programmers' confidence in program robustness and stability
  • Improved Design
  • Fast feedback reduces commissioning time
  • Facilitate refactoring

Of course, automated testing cannot guarantee that a program is completely correct, and in fact, in the actual development process, writing automated testing code is usually a link that developers do not like. In most cases, after developing a function, the front-end developers just open the browser and click manually to check whether the effect is correct, and then seldom manage the block of code. There are two main reasons for this:

  • One is that the business is busy and there is no time to write tests
  • The other is how to write tests

test type

The most common tests for front-end development are mainly the following:

  • Unit testing: verifying that an independent unit works correctly
  • Integration testing: verifying that multiple units work together
  • End-to-end testing: verify application interaction in a real browser environment from the user's point of view in a machine-like manner
  • Snapshot testing: validator UI changes

unit test

Unit testing is the process of running tests on the smallest parts (units) of an application. Usually, the unit of test is the function, but in front-end applications, the component is also the unit under test.

Unit tests can call functions in source code in isolation and assert that they behave correctly.

The following are supporting learning materials. For friends who do [software testing], it should be the most comprehensive and complete preparation warehouse. This warehouse also accompanied me through the most difficult journey. I hope it can help you too!

Software testing interview applet

The software test question bank maxed out by millions of people! ! ! Who is who knows! ! ! The most comprehensive quiz mini program on the whole network, you can use your mobile phone to do the quizzes, on the subway or on the bus, roll it up!

The following interview question sections are covered:

1. Basic theory of software testing, 2. web, app, interface function testing, 3. network, 4. database, 5. linux

6. web, app, interface automation, 7. performance testing, 8. programming basics, 9. hr interview questions, 10. open test questions, 11. security testing, 12. computer basics

Information acquisition method:

Guess you like

Origin blog.csdn.net/myh919/article/details/132024538