project | content |
---|---|
This work belongs courses | 2020 Computer Software Engineering Institute (Roger Ren Jian) |
Where this requirement in the job | Twinning project work |
Teaching classes | 006 |
project address |
1. PSP table
PSP2.1 | Personal Software Process Stages | Estimated time consuming (minutes) | The actual time-consuming (minutes) |
---|---|---|---|
Planning | plan | ||
· Estimate | • Estimate how much time this task requires | ||
Development | Develop | ||
· Analysis | · Needs analysis (including learning new technologies) | ||
· Design Spec | Generate design documents | ||
· Design Review | · Design Review (and his colleagues reviewed the design documents) | ||
· Coding Standard | · Code specifications (development of appropriate norms for the current development) | ||
· Design | · Specific design | ||
· Coding | · Specific coding | ||
· Code Review | · Code Review | ||
· Test | · Test (self-test, modify the code, submit modifications) | ||
Reporting | report | ||
· Test Report | · testing report | ||
· Size Measurement | · Computing workload | ||
· Postmortem & Process Improvement Plan | · Hindsight, and propose process improvement plan | ||
total |
4. Design and realization of the calculation module interface
Calculation module interface section 6. Performance Improvement
7. Design by Contract & Code Contract
8. The unit test coverage
Where code coverage using VS2017 Enterprise :( tool generates code coverage)
The cell-based test coverage for project \ (93.07 \% \) , for the coverage of the Circle class \ (100 \% \) , based on a coverage of Line \ (98.5 \% \) .
We set up a test and a test for abnormal for the function.
For functional testing, we tested the functionality of some functions circles, lines, line segments and rays under normal conditions, but also constructed a test case under some special circumstances, such as
// 射线 圆 内部相交
PlaneContainer pc;
pc.insert(new Circle(0, 0, 2));
pc.insert(new Line(1, 0, 2, 2, RL));
int count = pc.countIntersectionPoints();
Assert::AreEqual(count, 1);
// 射线 射线 一个交点
PlaneContainer pc;
pc.insert(new Line(0, 0, 1, 1, RL));
pc.insert(new Line(0, 0, -1, -1, RL));
int count = pc.countIntersectionPoints();
Assert::AreEqual(count, 1);
// 精度测试
PlaneContainer pc;
pc.insert(new Line(0, -100000, 1, 100000, SL));
pc.insert(new Line(0, 0, 0, 1, SL));
pc.insert(new Line(0, -99999, 1, -99999, SL));
int count = pc.countIntersectionPoints();
Assert::AreEqual(count, 3);
And for an abnormal test case as follows:
异常