Testing Theory - code coverage
Others
2019-11-23 14:05:55
views: null
- Outline
- I know what sort of code coverage
- background
- Appreciated that the white box case design
- Over design, a standard always necessary to evaluate certain aspects of the use of the embodiments
- This may be, it is the meaning of the coverage proposed
- As to who first proposed this, and for what purpose, it is now difficult to trace
- Mostly I'm too lazy to research ...
1. Review: white box test case design ideas with
- Outline
- Recall design ideas white-box use cases
- Thinking
- Code coverage
- Branch coverage
- Condition coverage
- Branch condition coverage
- Multiple condition coverage
- ref
- Will be back
2. Coverage
- Outline
- Brief coverage
- Coverage
- effect
- Measure the degree of test cases to test the code
- significance
- Where there is no test to identify those
- Pay attention to portion not covered
- The focus is to explain these issues
- Why are not covered
- You can cover
- For quality testing, without any representation
- Yes, high coverage, not necessarily test well
- Calculation
- Code coverage
- Coverage = Number of measured line / total number of lines of code
- Of course, there are other coverage
- How those counted, there may be talk back
3. Common coverage indicators
- Outline
- To jacoco indicators, for example, briefly explain
- jacoco execution results
- Outline
- Brief description of the results of the next jacoco
- Row
- Element
- Test package
- Missed Instructions & Cov
- Instruction covering
- Missed Branhes & Cov
- Branch coverage
- Missed & Cxty
- Cyclomatic complexity
- Missed & Lines
- Code coverage
- Missed & Method
- Methods covered
- Missed & Classes
- Class overrides
1. Instruction cover
- Outline
- Instruction-level coverage
- instruction
- Java code is compiled final results of binary code
- So then it does not matter, and code format
- Instruction coverage
- This coverage is a relatively low-level coverage
- I felt some of the covering method mentioned before, not so direct correlation
- So understanding will be some strange feeling
- Independent code
- Code format, this will not affect coverage
- Only final binary code, would be affected
- Not even code source files, can be used to try coverage
- other
- Simple search of the investigation data and found that basically said is vague
- The said independent code, and size-covered
- Specifically how to use, few mention
2. branch coverage
- Outline
- Branch level coverage
- Branch
- contain
- if
- switch
- Branch coverage
- significance
- A measure of the extent of the testing branch
- prompt
- No cover
- Code comes with a red background
- Partially covered
- Code comes with a yellow background
- Completely covered
- Code comes with a green background
3. cyclomatic complexity
- Outline
- Cycle-related coverage
- Cyclomatic complexity
- Outline
- This is a graph theory related concepts
- discrete mathematics...
- Object Description
- Code as a whole
- Not cycling
- significance
- Description overall complexity code
- The lower the code is easy to understand
- Cyclomatic complexity of jacoco
- I'm sorry I really did not understand
- It feels like a bit like a branch coverage
- But there are real differences
- This can only be a regret
4. Code Coverage
- Outline
- Row-level code coverage
- Row
- Is the line of java code
- Code coverage
- significance
- A measure of the extent of testing of lines of code
- prompt
- Testing with branch
5. The method of covering
- Outline
- Method-level code coverage
- method
- method
- Certain methods do not count on the inside
- This supplement will be free, for example, which I will take into account, there is no result
- Abstract method
- Interface Method
- Construction method
- finalize
- Methods covered
- A method, as long as the line of code is executed, even if the covering
- Methods Coverage
- significance
- Test the extent of measurement methods
6. class overrides
- Outline
- Class level code coverage
- class
- class
- Certain classes do not count on the inside
- This will supplement free
- Class overrides
- A class, as long as the line of code is executed, even if the covering
- This supplement will be free, for example, which I will take into account, there is no result
- Abstract class
- Interface classes
- No direct interface to achieve class of nameless
- Class Coverage
- significance
- Tests measure the degree of class
ps
- ref
- Testing Theory - white-box testing - test case design
- I sort of cases before the white box with design ideas
- Talking to praise test code coverage
- Understanding of the significance of the coverage, I feel very good, it is worth thinking
- To explain the mechanism of coverage tools, I do not think much
- Feeling a little casual, intermittent speaks
- jacoco
- Some explain the principles of jacoco
- Currently have not seen, there is time to savor
- jacoco report, for a description of the parameters, is the official website of document translation
- jacoco
- Incremental code coverage tool
- Like test team has made improvements to jacoco
- Incremental test the code coverage tool
- Have time to savor
- Cyclomatic Complexity
- Cyclomatic complexity
- Follow-up
- Understand some of the tools
- JaCoCo
- here
- maven
- jenkins
- IDEA Code Coverage
- here
- SonarQube
- jenkins
Origin www.cnblogs.com/xy14/p/11917650.html