Beruflich Dokumente
Kultur Dokumente
Elena Rudovol
February, 13, 2014
Requirement specifications
Design document
Source Code
Test Plans
Test Cases
Test Scripts
Help or User document
Web Page content
www.sitecore.net
Page 2
Static testing
Dynamic testing
Verification process
Validation process
Prevention of defects
Evaluates code/documentation
www.sitecore.net
Page 3
Good practices:
BDD is a good approach for writing good specification. It includes all best
practices above.
www.sitecore.net
Page 4
Adoption:
www.sitecore.net
Page 5
obvious mistakes,
mistakes that difficult to find after-the-fact (e.g. thread synchronization, resource leaks etc.),
Well-documented software:
consistent end-user documentation (Its important for Sitecore to provide well-documented API!),
Good practices:
review can to be done by any team member (not only lead developer),
add a status Ready for Review into bug-tracking system.
www.sitecore.net
Page 6
Comments in code:
API should be well documented (feedback from marketing department)
tools for comments generating (e.g. GhostDoc, Doxygen)
most public methods should be documented (E.g. metric is 80%)
no commented rows in code
Duplications:
We should achieve 0% of copy-paste in code.
Violations:
We should pay attention on Sonar violations and fix blockers, critical and major.
www.sitecore.net
Page 7
LCOM4 metric
Lack of Cohesion of Methods (LCOM4) metric:
The more cohesion the higher probability to fail if functionality is changed.
Good LCOM4 example:
public class ClientData
{
public string FirstName;
public string LastName;
}
}
www.sitecore.net
Page 8
UI
Business
logic
www.sitecore.net
Database
Page 9
Code complexity
The complexity is measured by the number of if, while, do, for, ?:, catch, switch, case statements,
and operators && and || (plus one) in the body of a constructor, method, static initializer, or instance
initializer.
Generally:
- up to 7 for method
- up to 15 for class
www.sitecore.net
Page 10
www.sitecore.net
Page 11
www.sitecore.net
Page 12
www.sitecore.net
Page 13