1 / 22

A Bag of Tricks for Validation

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. A Bag of Tricks for Validation. Connecting the SRM to the Assertion-Repository using AspectJ Meta-Assertions

gema
Download Presentation

A Bag of Tricks for Validation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 NASA IV&V Facility Workshop on Validation Morgantown, WV

  2. A Bag of Tricks for Validation Connecting the SRM to the Assertion-Repository using AspectJ Meta-Assertions Using Code Coverage to find Missing Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

  3. Connecting the SRM to the Assertion-Repository using AspectJ Background Embedded Assertions External Assertions – Assertion Repository Hardwired Assertion Bridge Aspect-J Bridge NASA IV&V Facility Workshop on Validation Morgantown, WV

  4. Connecting the SRM to the Assertion-Repository using AspectJ Embedded Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

  5. Assertion Repository Connecting the SRM to the Assertion-Repository using AspectJ 2. Assertion repository (see NASA Journal Paper) NASA IV&V Facility Workshop on Validation Morgantown, WV

  6. Connecting the SRM to the Assertion-Repository using AspectJ 2. Assertion repository: hardwired bridge NASA IV&V Facility Workshop on Validation Morgantown, WV

  7. Connecting the SRM to the Assertion-Repository using AspectJ class ExternalAssertionsUser { … protected void fireExternalAssertions(String sEventName) { externalAssertionChecker. execTReventDispatcher(…); } … } 2. Assertion repository: hardwired bridge E.g., In domain model class Foo { public void reqPublish() { // connect to External assertions bundle fireExternalAssertions("reqPublish") } } NASA IV&V Facility Workshop on Validation Morgantown, WV

  8. Connecting the SRM to the Assertion-Repository using AspectJ // 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(..)); 2. Assertion repository: AspectJ bridge AspectJ bridge NASA IV&V Facility Workshop on Validation Morgantown, WV

  9. Meta-Assertions NASA 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. NASA IV&V Facility Workshop on Validation Morgantown, WV

  11. Meta-Assertions Validation Architecture: Assertion Repository NASA 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. NASA IV&V Facility Workshop on Validation Morgantown, WV

  13. Meta-Assertions Architecture: isSuccess NASA IV&V Facility Workshop on Validation Morgantown, WV

  14. Meta-Assertions Guard succeeds iff frequency of traversing the transition is greater than or equal to (GE) 0.6 Statistical assertions: 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. NASA IV&V Facility Workshop on Validation Morgantown, WV

  15. Using Code Coverage to find Missing Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

  16. Using Code Coverage to find Missing Assertions Traffic Light Controller SRM NASA IV&V Facility Workshop on Validation Morgantown, WV

  17. Using Code Coverage to find Missing Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

  18. Using Code Coverage to find Missing Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

  19. Run validation tests through DM using Coverage tool (Emma here): Using Code Coverage to find Missing Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

  20. Using Code Coverage to find Missing Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

  21. Using Code Coverage to find Missing Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

  22. Using Code Coverage to find Missing Assertions NASA IV&V Facility Workshop on Validation Morgantown, WV

More Related