Read the programmer s README note 06 Test above .

Mondo Technology Updated on 2024-01-28

2.1.Testing itself is more likely to become a hectic task.

2.2.Poor testing increases developer overhead without providing value, and it also increases the instability of the test suite.

3.1.The test can check if ** is working properly.

3.1.1.The tests themselves can verify that the software behaves as expected.

3.1.2.Unexpected software behavior can cause a lot of confusion for users, developers, and operators.

3.1.3.Testing this process can prove that ** has taken effect according to the regulations.

3.2.Protection** will not be affected by those inadvertent changes in the future.

3.2.1.Testing protects existing behaviors from new changes.

3.3.Encourage refreshing**.

3.4.Forcing developers to try out their own APIs

3.4.1.Writing tests also forces developers to think about the interface and implementation of their programs.

3.4.2.Writing tests can also force developers to ensure that they are well-constructed by improving separation of concerns and reducing tight coupling, respectively.

3.5.Record how components interact with each other.

3.5.1.Tests are actually another form of documentation that illustrates how they are interacted with.

3.6.As a "playground" for experiments

3.7.Test-driven development.

3.7.1. test driven development,tdd

3.7.2.TDD refers to the practice of writing tests before writing them, and if the test fails to run the test after it has been written, then write it to pass.

4.1.Successful projects make pragmatic testing decisions in the real world.

4.2.Unit tests.

4.2.1.Verify the "unit" of **

4.2.2.Usually refers to a single method or behavior.

4.2.3.Unit tests should be fast, short, and focused.

4.2.3.1.Eliminating external dependencies can make unit testing fast and focused.

4.2.4.Emulating a remote system allows testing to bypass network calls, simplifying setup and avoiding slow runs.

4.2.5.Mock methods and objects allow developers to write centralized unit tests that can accomplish only one specific behavioral action.

4.3.Integration testing.

4.3.1.Verify that multiple components work when integrated together.

4.3.2.If you find yourself instantiating multiple interacting objects in your tests, then you're probably writing about integration tests.

4.3.3.Developers run integration tests less frequently, so the feedback cycle is longer.

4.3.4.You can find problems that are difficult to find with separate unit tests.

4.4.System testing.

4.4.1.Verify the overall operation of the entire system.

4.4.2.The end-to-end (e2e) workflow is designed to simulate the system's interaction with real users in a pre-production environment.

4.5.Performance testing.

4.5.1.Monitor system performance in different configurations.

4.5.2.Load testing can monitor performance at different load levels.

4.5.3.Stress testing pushes the load on the system to the point of collapse.

4.5.3.1.Stress testing exposes exactly how much a system is capable of loading, and what happens under excessive load.

4.5.4.Useful for capacity planning and SLO definitions.

4.6.Acceptance testing.

4.6.1.means a test conducted by the customer or its ** to verify that the delivered software meets the acceptance criteria.

4.6.2.Formal acceptance tests and acceptance criteria are specified as part of an expensive contract.

4.6.3.The International Standards Organization (ISO) requires acceptance testing to validate clear business requirements as part of its safety standards.

4.6.3.1.The ISO Certification Audit Board requires requirements and corresponding test documentation evidence.

5.1.A tool for writing test cases.

5.1.1.Mock libraries, for example, can help you write clean and efficient tests.

5.1.2.Mock libraries are often used for unit testing, especially in object-oriented libraries.

5.1.3.Mock libraries can also prevent your application's ** from being cluffed with test-specific methods, parameters, or variables.

5.1.4.Mocking libraries help developers access protected methods and variables without having to modify the norms.

5.1.5.The over-reliance on analog libraries is an off-smell that suggests tightly coupled.

5.2.Test the framework.

5.2.1.Facilitate the running of tests by simulating the life cycle of a test, from setup to teardown.

5.2.1.1.Manage test setup and teardown

5.2.1.2.Manage test execution and orchestration.

5.2.1.2.1.You can help control the speed and isolation of your tests by orchestrating your testing process.

5.2.1.2.2.Serial tests are performed one after the other, and it is safer to perform one test at a time because there is less chance of the tests interacting with each other.

5.2.1.2.3.Parallel execution is faster, but it's more error-prone due to shared state, resources, or other contamination.

5.2.1.3.Generate a report of the test results.

5.2.1.3.1.Help developers debug those failed build tasks.

5.2.1.4.Provide tools such as extended assertion methods.

5.2.1.5.Integrate with the Coverage tool.

5.2.2.Test results can also be saved, integrated with build systems, and other accessibility features can be provided.

5.3.* Quality tools.

5.3.1.The tool for enforcing quality rules is called a linter, and the linter can run static analysis and perform style checks.

5.3.2.Be pragmatic for those who fail to pass the quality inspection.

5.3.3.Don't make it worse, but also avoid cleaning up the project in a way that disruptively stops everything.

5.3.4.Used to analyze coverage and complexity.

5.3.4.1.* Complexity tool can be used to calculate cyclomatic complexity.

5.3.4.1.1.Roughly by the number of paths to guard against overly complex logic.

5.3.4.1.2.The higher your complexity, the harder it is to test and the more likely it is to contain more bugs

5.3.4.1.3.Lap complexity usually increases with the size of the library, so a high overall score isn't necessarily a bad thing.

5.3.4.2.The Coverage tool measures how many rows have been executed by the test suite.

5.3.4.2.1.If you modify the lower coverage, you should write more test cases.

5.3.4.2.2.Make sure that the test cases can be validated against any new changes you make, with a reasonable coverage as the goal.

5.3.4.2.2.1.Experience is between 65% and 85%.

5.3.4.2.3.Coverage alone is not a measure of test quality.

5.3.4.2.3.1.It can be very misleading, both at times of high or low reach.

5.3.4.2.3.2.Obsessed with creating unit tests for the sake of 100% coverage doesn't guarantee that yours will be able to integrate safely.

5.3.5.Look for bugs through static analysis

5.3.6.Check for style errors.

5.3.6.1.The style checking tool ensures that all sources are formatted the same.

5.3.6.2.Maximum number of characters per line, camel nomenclature and serpentine nomenclature, appropriate indentation.

5.3.6.3.A consistent style helps multiple programmers collaborate on a shared library.

5.3.6.4.It is highly recommended that you set up your IDE so that all style rules can be applied automatically.

5.3.7.It is usually run as part of a build or compilation step.

Related Pages