1 / 7

Automatic Test Generation from Formal Specifications

Automatic Test Generation from Formal Specifications. Dr. Paul E. Black paul.black@nist.gov http://hissa.nist.gov/~black/. Program under test. Specs. Specs. Specs. Program under test. test program. Stages of Automated Testing. 1 Manual 2 Custom Program Runs Tests

Download Presentation

Automatic Test Generation from Formal Specifications

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. Automatic Test Generation from Formal Specifications Dr. Paul E. Black paul.black@nist.gov http://hissa.nist.gov/~black/

  2. Program under test Specs Specs Specs Program under test test program Stages of Automated Testing 1 Manual 2 Custom Program Runs Tests 3 Create Program from Spec Test Program Generator Program under test test program Paul Black

  3. Automatic Test Generation test objectives counter- examples . . System specs use test criterion check model combine scenarios scenarios . . . . Complete Tests NIST TAO test results run tests System source http://hissa.nist.gov/~black/AFTG/ Paul Black

  4. test require- ments . use test criterion . . coverage metric = # requirements satisfied total # requirements Specification-based Coverage Metric • How can we measure test set quality without code? AG(S0&a&b -> AX S1) AG(S0&(~a|~b)->AX S0) AG(S1 & a -> AX S0) AG(S1 & ~a -> AX S1) check model Test case: State 1.1: state = S0 a = 1 b = 1 State 1.2: state = S1 a = 1 State 1.3: state = S0 a&b convert to CFSM S0 S1 a Paul Black

  5. Specification Abstraction • How can we soundly fit high-level specification into low-level descriptions? specifications Finite Modeling High Level System specs Low Level Functional specs for model checkers in Z, UML, VDM, Matlab, SCR, etc. Paul Black

  6. Examples of ATG • Cruise Control • 24 test cases • 87% branch coverage of code (13 of 15) • test code is 6,279 lines of Java • Reactor Safety Injection • 16 test cases, 9 after coverage minimization • Java VM Stack • 29 test cases • test code is 1,524 lines of C • Flight Guidance System • 292 test cases, 78 after coverage minimization • Secure Operating System Paul Black

  7. Current Tools (as of June 2000) • Extract UML State Chart • Mutate Test Specifications • Reduce Tests • Report Coverage Metric • Generate Test Code Paul Black

More Related