Download presentation
Presentation is loading. Please wait.
Published byRoxanne Lily Park Modified over 8 years ago
1
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 1 A Bag of Tricks for Validation Presented by Doron Drusinsky Joint work with Bret michael, Man-Tak Shing, and Tom Otani Naval Postgraduate School Monterey, CA
2
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 2 A Bag of Tricks for Validation 1. Connecting the SRM to the Assertion-Repository using AspectJ 2. Meta-Assertions 3. Using Code Coverage to find Missing Assertions
3
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 3 Connecting the SRM to the Assertion-Repository using AspectJ Background Embedded Assertions Embedded Assertions External Assertions – Assertion Repository External Assertions – Assertion Repository Hardwired Assertion Bridge Hardwired Assertion Bridge Aspect-J Bridge Aspect-J Bridge
4
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 4 Connecting the SRM to the Assertion-Repository using AspectJ 1. Embedded Assertions
5
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 5 Connecting the SRM to the Assertion-Repository using AspectJ 2. Assertion repository (see NASA Journal Paper) Assertion Repository
6
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 6 Connecting the SRM to the Assertion-Repository using AspectJ 2. Assertion repository: hardwired bridge
7
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 7 Connecting the SRM to the Assertion-Repository using AspectJ 2. Assertion repository: hardwired bridge class ExternalAssertionsUser { … protected void fireExternalAssertions(String sEventName) { externalAssertionChecker. execTReventDispatcher(…); } … } E.g., In domain model class Foo { public void reqPublish() { // connect to External assertions bundle fireExternalAssertions("reqPublish") }
8
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 8 Connecting the SRM to the Assertion-Repository using AspectJ 2. Assertion repository: AspectJ bridge AspectJ bridge // After returning from calls specified in // execMethod() do... after() returning: execMethod() { if (assertions == null) return; String sMethodName = thisJoinPoint.getSignature().getName(); Object[] _args = thisJoinPoint.getArgs(); fireAssertions(sMethodName, _args); } pointcut execMethod(): execution(int *(..)) && !target(ExternalAssertionChecker) // not an assertion && !target(ITRAssertion) // not an assertion && !target(TestCase) && !execution(int getInstanceID(..)) && !execution(int getPS(..)) && !execution(int execTReventDispatcher(..)) && !execution(int execTRminorCycle(..)) && !execution(int execTRFireSubstatecharts(..));
9
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 9 Meta-Assertions
10
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 10 Meta-Assertions A meta-assertion is an assertion about the existing set of assertions (the assertion repository) currently in use.
11
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 11 Meta-Assertions Validation Architecture: Assertion Repository
12
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 12 Meta-Assertions Example R2: Once the Traffic-Light SUT has lights turn red three times or more then at least one assertion is expected to fail while lights are red.
13
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 13 Meta-Assertions Architecture: isSuccess
14
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 14 Meta-Assertions Statistical assertions: Guard succeeds iff frequency of traversing the transition is greater than or equal to (GE) 0.6 Using these constraints, the user effectively forces the JUnit test-suite to spend 60% or more of its testing energy along the newTruck path and the remainder along the timeoutFire path.
15
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 15 Using Code Coverage to find Missing Assertions
16
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 16 Using Code Coverage to find Missing Assertions Traffic Light Controller SRM
17
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 17 Using Code Coverage to find Missing Assertions
18
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 18 Using Code Coverage to find Missing Assertions
19
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 19 Using Code Coverage to find Missing Assertions Run validation tests through DM using Coverage tool (Emma here):
20
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 20 Using Code Coverage to find Missing Assertions
21
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 21 Using Code Coverage to find Missing Assertions
22
September 8, 2008NASA IV&V Facility Workshop on Validation Morgantown, WV 22 Using Code Coverage to find Missing Assertions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.