Hieu Le Trung
   Enterprise Architect
   The merging of JUnit + Cobertura/Emma +
    Testdox
   The merging of NUnit + NCover + Troy
   Process at R&D
   Issues




                                              Page 2
   Enterprise Architect supports
       UML 2.0
       Languages: C++, C#, Java, Delphi, VB.Net, Visual Basic,
        ActionScript, PHP and Python
       Requirement Management
       Database Modeling
       Forward and Reverse-engineering
       Document generation
       Testing Support
           Unit tests
           Integration tests
           System tests
           Acceptance tests
           Scenarios
       Traceability

                                                                  Page 3
   JUnit
       Unit test framework
   Cobertura / Emma
       Test coverage compare to source code tool
   Testdox
       Test coverage compare to requirement tool
       Generate unit test documentation from source code
       Example
           From




           To




   The merging of those tools helps
       Unit test our module
       Verify the unit test coverage with source code
       Verify the unit test coverage with requirement



                                                            Page 4
   The same as Java but on .NET platform
   NUnit
       Unit test framework
   NCover
       Test coverage compare to source code tool
   Troy
       Test coverage compare to design spec tool

   The merging of those tools helps
       Unit test our module
       Verify the unit test coverage with source code
       Verify the unit test coverage with design spec


                                                         Page 5
Develop
     Requirement                      In case the sub-model is developed
                                       by developer, we can re-organize
                                        the test generation in the design
                                                  review phase


  Design Architecture
                                           During the project
                                               executing

                                          Sync source code and unit
                                               test with model
Generate Unit Test from
     Architecture




   Modify Unit Test       Generate source code
       design                and unit test


                                                                      Page 6
   Use Enterprise Architect to enforce
    development head first on Unit Test
   Apply Peer Review into Unit Test
    development: one developer, one unit tester
       Maybe 1 unit tester for many developers
   Use Category of NUnit or JUnit or MbUnit to
    classify long run test
   New-created test always fails



                                                  Page 7
   Pros
       Can think first the unit test design
       Easier for developer since the methods have been designed and
        generated for him, he’s just need to write the logic
   Cons
       Burden for software architecture
       Depend much on tools: Enterprise Architect

   Issues
       Refactoring the test code
       Un-clear requirement (minor)
       Mock object for XML-RPC
       Tests which depend on environment such as COM interface
       Test coverage on .NET
       Yes, much effort !

                                                                        Page 8

Model For Applying Unit Test

  • 1.
  • 2.
    Enterprise Architect  The merging of JUnit + Cobertura/Emma + Testdox  The merging of NUnit + NCover + Troy  Process at R&D  Issues Page 2
  • 3.
    Enterprise Architect supports  UML 2.0  Languages: C++, C#, Java, Delphi, VB.Net, Visual Basic, ActionScript, PHP and Python  Requirement Management  Database Modeling  Forward and Reverse-engineering  Document generation  Testing Support  Unit tests  Integration tests  System tests  Acceptance tests  Scenarios  Traceability Page 3
  • 4.
    JUnit  Unit test framework  Cobertura / Emma  Test coverage compare to source code tool  Testdox  Test coverage compare to requirement tool  Generate unit test documentation from source code  Example  From  To  The merging of those tools helps  Unit test our module  Verify the unit test coverage with source code  Verify the unit test coverage with requirement Page 4
  • 5.
    The same as Java but on .NET platform  NUnit  Unit test framework  NCover  Test coverage compare to source code tool  Troy  Test coverage compare to design spec tool  The merging of those tools helps  Unit test our module  Verify the unit test coverage with source code  Verify the unit test coverage with design spec Page 5
  • 6.
    Develop Requirement In case the sub-model is developed by developer, we can re-organize the test generation in the design review phase Design Architecture During the project executing Sync source code and unit test with model Generate Unit Test from Architecture Modify Unit Test Generate source code design and unit test Page 6
  • 7.
    Use Enterprise Architect to enforce development head first on Unit Test  Apply Peer Review into Unit Test development: one developer, one unit tester  Maybe 1 unit tester for many developers  Use Category of NUnit or JUnit or MbUnit to classify long run test  New-created test always fails Page 7
  • 8.
    Pros  Can think first the unit test design  Easier for developer since the methods have been designed and generated for him, he’s just need to write the logic  Cons  Burden for software architecture  Depend much on tools: Enterprise Architect  Issues  Refactoring the test code  Un-clear requirement (minor)  Mock object for XML-RPC  Tests which depend on environment such as COM interface  Test coverage on .NET  Yes, much effort ! Page 8