Hi Guys,
Would somebody help me to understand the functionality of Cobertura in the link below related to Flex language
for the lines 6,7,8 in the file Circle.as below a xml coverage file is provided which hits this ines by 1.
| package { |
|
|
| public class Circle { |
| public var diameter:int = 0; |
|
|
| 6 function Circle (d:int) { |
| 7 this.diameter = d; |
| 8 } |
| } |
| } |
As it displayed in the link line 6,7,8 for Circle.as have value '1'
| <lines> |
| <line number="6" hits="1" branch="false"/> |
| <line number="7" hits="1" branch="false"/> |
| <line number="8" hits="1" branch="false"/> |
| </lines> |
After running lines 6,7,8 will be green, 100% coverage.
Mijn question:
1- Is this xml file provided by the user?
2- there is no test file for Circle.as how is this percentage calculated by Cobertura? in eclipse Cobertura finds the lines in the code which are not tested in unit test. How does it work hier?
3- the user is able to manage xml file , if i hits the whole code by 1 then the result will be 100 % coverage.
What doest it make sense? It looks that Cobertura measures what the user defines as 1 or 0 in the xml file not the code.
Many thanks,
Fati