net.sourceforge.groboutils.mbtf.v1

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Test Coverage » GroboUtils » net.sourceforge.groboutils.mbtf.v1 
net.sourceforge.groboutils.mbtf.v1
net.sourceforge.groboutils.mbtf.v1 The Model-Based Testing Framework. Currently, the MBTF is a simple state machine engine that is able to generate cyclic paths through the various transitions presented by the state machine model, combined with a Path Parser that knows the correct procedure in iterating though a path, and executing the correct validation steps.

Implementation

Model-Based Testing allows for testing the various routes of computation though a system to ensure system integrity. Traditional testing methodologies requires the tester to calculate and manually generate these paths.

The logic goes something like this: the tester models the system in a state-machine, using a minimalistic model where possible. At each state, the tester creates validation tests to ensure the system is indeed in that state. Also, each state has an associated set of transitions; each transition has both a validation (to ensure the transition can occur), and an action which moves the current state to another state. The MBTF then takes this model and generates combinations of paths through the states. At each state, the state itself is verified, and all transitions are verified. Any error discovered causes the path to be recorded and stamped with the error for future evaluation.

Useage

A direct user of the MBTF needs to first define an implementation of ISystem. This class contains the necessary information and actions to perform state validation and transition actions for the system in question. Also, the user needs to define an ISystemFactory, which knows how to create an ISystem in the correct initial state.

I'd recommend for your particular System, creating an abstract IVerifiy implementation which allows for reducing the casting problem inherit in a generic system such as this:

    public abstract class MyVerify implements IVerify
    {
        public final void verify( ISystem ss, IErrors errors )
        {
            myVerify( (MySystem)ss, errors );
        }
        
        public abstract void myVerify( MySystem mss, IErrors errors );
    }

Then, it's a matter of defining the system's set of states and transitions.

References

Java Source File NameTypeComment
IAction.javaInterface Performs a state-transition action on the system.
IError.javaInterface Contains all information relating to when an error (or warning) was reported to IErrors.
IErrors.javaInterface A container for registering errors or warnings caused by invalid validation of a state or transition.
IErrorsUTestI.javaClass Tests the IErrors interface.
IPath.javaInterface An ordered set of transitions plus a start state, which can be iterated through to discover a state-machine transition path.
IPathGenerator.javaInterface Creates different sets of paths through the state machine.
IPathHistory.javaInterface Records the states and transition history during a path traversal. The instance can be cloned for the cases of errors and warnings needing to store the path history when they occured.
IPathIterator.javaInterface An iterator to allow the tracing of the transitions through a state machine.
IPathParser.javaInterface Knows how to parse an IPath instance, and correctly follow the transitions and record errors.
IState.javaInterface Associates a system state with the transitions leading out of the state, and with the validation of the state.
ISystem.javaInterface A marker interface to indicate the current state of the system being modeled.
ISystemFactory.javaInterface Each new path should correspondingly have a new ISystem to interact with, to ensure that the system has been properly reset.
ITransition.javaInterface Corresponds to a state-machine transition from one state to another.
IValidate.javaInterface Performs a validation on a system, to ensure that the associated item (IState or ITransition) can be processed.
TestFailRuntimeException.javaClass Generating this exception during a test will cause only the current path to halt.
TestHaltRuntimeException.javaClass Generating this exception during a test will cause all testing, current path and future paths included, to halt.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.