??????????????????????????????????????????????? Contest ?????????????????????????????? FoCuS ???????????????????????????????????????????????????????????????????????????????????????????????????????????Щ????????????????????????????????????θ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????
??????????????????????????????????????????????????????????????????????????????????????????????д???????????????Ч??????????????????????????????????????????????????????????????????????????????????и??????????????????????и???????????????????????????????????????????????????????70%??80% ???? ??????????????????????????????????????????? : ????????? – > ????δ???????? – > ????2???????????????????????????????????
???????????????????
?????? CMMI4 ????????????ж??????????????????????????????????????????????????????????????д?????????????????????????????????е?????????????????????????????????????????????????????????????????????????????????????????????翪????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????漰????????????????????????δ??????????Test Hole???? ??????????????? Test Hole ??????????????????????????????????????????????????????????Ч?????????????????????????????????в???????????????????????????????????????????????????????к???????????????????????????????????????????????????????????????????????????????к???????????????????????????????
????????????????????
??????串?? Statement coverage (line coverage): ?????????????????????????????????е??и???????????????????????????????????????
???????????鴝?? Basic block coverage: ??????????????????????????λ????????? if/else ?е?????????????????????????????????????????????????????
???????????? Decision coverage (branch coverage): ???????????????????????
??????????? Function coverage (Method Function): ????????????????????з???????????
??????????????????
???????? Java ?????????????????????????????????? Instrumentation ???????????????????????λ?ò?????????????????????????????????????????????к???????????????????????к???????????????????????????????????Instrumentation ??????????????????Class Instrumentation ?? Source Instrumentation???????????????????? .class ???????????????????????????? (.java ??? ) ????????μ? .class ?????????????????????????????? Instrumentation ???????????? Class Instrumentation ??ù???????????????????Σ????ó??????????????????????????????????????????????????????????????汾????????????????????????????????????????? class?? ???????????????? Class Instrumentation ??????
????Contest ????
????Contest ????????????????????????????????????????? bug?? ?????y???????????????????????????????Contest ????????????????????????а?????????????????????е?????????? Eclipse ????????????????п?????????????????????Contest ??????С???????????????????????????????????????????Contest ???к???????????????????????????????????????????????????????????????????? Contest??Contest ?????????????????????????? method coverage ????????? basic-block coverage??
??????????????????????????
???????????Instrumentation ???????
????Instrumentation ???????????????????????????????????????????????? J2EE ??????У?web application?? ???? war ??????? ear ?????????? J2SE ?? C/S ???е? Java ??á????? Instrumentation ??????????? Contest ???л?????????·??????? contest.jar ??????ɡ?
???????? Instrumentation ????????? preference ???????????????? Instrumentation ???????????? King.Properties??
?????????????????????????????? method Coverage ?? basic-Block Coverage ??????????????? true??
????methodCoverage = true // ??????????
????basicBlockCoverage = false// ??? basic block ??????
????buffer_size = 2048 // ???? instrument ??????С
????output = . //Instrument ?????????·??
????instrument ????
?????????????? war ???? :
????java -classpath yourFolder:Contest.jar; com.ibm.Contest.instrumentation.Instrument yourFolderYourApp.war
???????? C/S ?? jar ??? :
????java -classpath yourFolder:Contest.jar; com.ibm.contest.instrumentation.Instrument your1.jar your2.jar your2.jar
??????б?д?????????? Instrument ?????????????·?????? com_ibm_contest??????? instrument ??????????????????????????????????????????????? YourApp.war?? ???????μ? YourApp.war ?????Size ?????????Щ??????????? YourApp.war_backup??
?????????????????????????????????
??????????????????? YourApp.war ????????????????????????????? Jboss ??????????? Jboss/server/default/deploy?? ????????? YourApp.war ?滻???? YourApp.war?? ????????÷????????????? YourApp.war ??????С????????????????????з????????????????????????????
???????????????в???????
???????????????????????????в???????????????????????????????????????????????????в?????????
??????????????????????
???????????????????????? com_ibm_contest ?????? Jboss ???????????????±??????? Jbossin????????????????????? trace file????????? 1 ?????


????
? 1. Contest Instrument ?????????

????FoCuS ?????????????????????? Contest ???????? Contest ?? Task ????? Trace ??????????????????????????????????????????????????
??????? FoCuS ??????????????????£???? FoCuS?? ???? YourFolderJavaConTestFoCuSFoCuS.bat????? 2 ?????FoCuS ????????ο????????????????????????? Task ???????? 3 ?????


????? 2. FoCuS ???????

????????????????????????? Task ?????????? 3 ?????


????? 3. ??? Task ???

???????? Task ?????FoCuS ???????????????????????????????????????????е? Task ????? Trace ?????????????? Coverage?? ??? 4 ?????


????? 4. ?????μ???????