Automating Software Communications Architecture (SCA) Testing with Spectra CX
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Automating Software Communications Architecture (SCA) Testing with Spectra CX

on

  • 1,202 views

Testing early on and throughout the development cycle reduces the risks that affect time to market, cost and software quality. By exercising components (application components, devices and services) ...

Testing early on and throughout the development cycle reduces the risks that affect time to market, cost and software quality. By exercising components (application components, devices and services) at the beginning of the development cycle in a runtime environment, and by continuing to test, as components are refined, developers can be assured of continuous Software Communications Architecture (SCA) compliance up to development cycle completion. Spectra CX SCA Test can be used to test the software aspects that have been hand written, generated automatically using a Spectra CX Code Generator, or generated automatically using a 3rd party tool. Developers benefit from fully automated testing of all aspects of the SCA specified interfaces for each component.

These slides will demonstrate the steps for unit testing the standard SCA interfaces of an SCA component with Spectra CX SCA Test. Topics will include: introduction to the Spectra CX unit testing framework; generation of standard unit tests; execution of unit tests on-host and on-target; and creating custom test cases.

Statistics

Views

Total Views
1,202
Views on SlideShare
1,202
Embed Views
0

Actions

Likes
0
Downloads
12
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Automating Software Communications Architecture (SCA) Testing with Spectra CX Presentation Transcript

  • 1. March 3, 2011 Automating SCA Testing with Spectra CX
  • 2. INTRODUCTION
    • Spectra CX is a model-driven development tool that forms the backbone of the Software Communications Architecture (SCA) development process.
    • Spectra CX (SCX) reduces development risk, accelerates development and improves the software quality of SCA applications and platforms through SCA validation and automatic generation of SCA artefacts.
    • The SCA Test feature facilitates a key element in this development process by providing industrial strength SCA component test code generation, execution of tests on host or target systems, and detailed reporting of test results.
  • 3. AGENDA
    • Overview of the SCA Test feature
    • Benefits of SCA Test
    • How it works
    • How you use SCA Test
      • Workflow
      • Demonstration
    • Customization and Extensibility
  • 4. Validation versus Testing XML Descriptors Binaries Validation (Static) Test (Dynamic) Validation Report Test Cases Validation Rules Test Report SCA Model
  • 5. Spectra CX – SCA Test
    • Model-based testing framework for the SCA
      • Plug-in feature for Spectra CX 3.2.X
    • Provides radio developers with a standalone capability for unit testing SCA components
      • On-host or on-target using TargetLoader
      • Implementation independent, black box, testing using JUnits and CORBA
    • Includes test cases for the Component Lifecycle interface
    • Supports user-defined test cases
  • 6. Tests – Base Application Interfaces
  • 7. Tests – Base Device Interfaces
  • 8. Benefits of Unit Testing
    • By automating the process of testing SCA components and applications, SCA Test significantly accelerates the testing cycle, improves user productivity and establishes high quality software from the very beginning of the development cycle
      • SCA Test can be used to test the compliance of software that may have been hand written, generated automatically using a Spectra CX Code Generator, or generated using a 3rd party tool.
    • Testing early on and throughout the development cycle reduces the risks that affect time to market, cost and software quality.
      • By exercising components at the beginning of the development cycle in a runtime environment, and by continuing to test as components are refined, developers can be assured continuous SCA compliance up to development cycle completion.
  • 9. Benefits of SCA Test
    • SDR/SCA-specific model-based testing
      • Provides a test capability that is optimized for SDR/SCA
      • Testing based on the current design and implementation
    • Completely integrated with the Spectra CX development environment,
      • All SCA Test compile, build and execute actions can be initiated from the Spectra CX environment.
      • Users can prepare the runtime environment for execution and observe their code running on host and/or target.
      • Developers benefit from the simplicity of using only one tool for modeling, validation, code generation, execution, and test.
    • Tests can be executed on host or target
      • Unit testing can even begin with only a basic CORBA connection to the component allowing testing to begin before a full platform with a live SCA operating environment is available.
      • Multiple implementations of a component can be tested to ensure proper operation on all defined implementation platforms.
  • 10. How it Works SCA Test Feature Eclipse JUnit Framework (Java) SCA Test Target Loader (C++) Component Under Test Communicates with via CORBA Instantiates Generates JUnits Instantiates & Terminates Component Host Host or Target
  • 11. TargetLoader
    • In an SCA system typically the operating environment and more specifically the platform elements take care of instantiating components and or devices.
    • Since it is desirable to test components before this may be available or without the overhead of the SCA operating environment we provide TargetLoader software.
      • TargetLoader is responsible for loading the component under test into the appropriate environment.
    • Typically there will be one TargetLoader for each target environment
      • A TargetLoader can be referenced by multiple component implementations -- don’t have to model the TargetLoader for each component implementation
      • Once a TargetLoader is running, it can be reused for multiple test executions
  • 12. SCA Test Workflow Generate Compile Execute Evaluate Prepare For each component to be tested Create test project(s)/model(s) Build the TargetLoader(s) Run the TargetLoader(s) Model the TargetLoader(s)
  • 13. Generating Component Tests
    • SCA Test generates a JUnit test for a component’s LifeCycle, PortSupplier, PropertySet, ResourceFactory, Resource and Device interfaces
    • Any component implementation can be designated for automatic testing.
    • A comprehensive suite of tests will be automatically generated for each component.
    • The generated test harness includes all the code needed for connecting to and exercising, through CORBA, the resource interface on the component under test -- an SCA Core Framework is not required .
  • 14. Compiling Component Tests
    • The target may be an actual SDR platform or the host development environment, depending on the compiler and CORBA tooling that is available for the test harness.
    • The generated testing software can be fully integrated into the project’s build process.
    • Spectra CX can be directed to automatically build the generated test harness into an executable, ready to run on host or target.
  • 15. Executing Component Tests
    • SCA Test generates the JUnits which interact with the Target Loader
    • Target Loader deploys and instantiates the component implementation and test harness binaries on the host or target platform
    • Users simply initiate the test from Spectra CX
      • Once initiated, execution of the tests defined for SCA resource compliance is carried out by the JUnit through the CORBA environment, without need for an SCA Core Framework to be present
    • Results of the tests are recorded by the JUnit
  • 16. Evaluating Test Results
    • Upon completion of the tests, a unified report is presented in the SCX user interface
    • This report can then be used to correct any issues identified and/or prove compliance with the SCA standard for components that support the LifeCycle, PortSupplier, PropertySet, ResourceFactory, Resource or Device interfaces
    • A standard JUnit report (xml) is also generated
      • This can be converted into HTML and other formats
  • 17. DEMONSTRATION
  • 18. Customization and Extensibility
    • Spectra CX uses open standards to translate model information to test code and gives users full access to the code template.
      • Users can modify tests
      • Engineering teams can optimize the template to accommodate their environment if they need to.
    • Provide customer extensible framework for unit testing a component
      • Generate empty tests for all provides ports methods
      • Customers can add their own JUnit tests
    • Generate Target Loaders from the tool using build configurations
      • Provides support for the customer’s target platform(s)
  • 19. Adding Unit Tests for an SCA Component
    • Create a new Java Project
    • Create a new class for the test cases
    • Configure the build path for the project
    • Add a JUnit library
    • Add a default constructor to the test class
    • Add test cases
  • 20. Create a new Java Project
    • Select ‘File > New >Java Project’ while in the Java Perspective.
    • In the ‘New Java Project’ wizard set the ‘Project Name’. Leave the other values as their defaults. Click the ‘Next’ button.
  • 21. Set the project parameters
    • On the ‘Java Settings’ page switch to the ‘Project’ page.
    • Click the ‘Add…’ button and add the project that contains your generated test code.
  • 22. Create a new class for the test cases
    • Right-click on the “src” folder in the new Java project and select ‘New > Class’.
  • 23. Set the class fields
    • In the ‘New Java Class’ wizard set the ‘Package’, ‘Name’ and ‘Superclass’ fields.
    • The ‘Superclass’ field should be set to the implementation test class from the generated test code.
  • 24. Configure the build path for the project
    • Configure the build path for the project so that the class will not have compilation errors.
    • Select the new Java project and right-click, then select ‘Build Path > Configure Build Path…’
  • 25. Add a JUnit Library
    • Switch to the ‘Libraries’ page and click on ‘Add Library…’.
    • Select the ‘JUnit’ library
    • Make sure that the ‘JUnit Library Version’ is set to JUnit 3 .
  • 26. Add a default constructor to your class
    • For example, the following shows a default constructor that makes use of the default behavior and changes the path to the component under test binary. If the component is generated by Spectra CX then your path will resemble this pattern “../ <generated src project name> /” + hostFileName.
        • public EncryptorUnitTests() throws Exception {
        • super ();
        • hostFileName = &quot;../EncryptDecrypt_SRC/&quot; + hostFileName;
        • }
    • Test out your extension using Run As > JUnit Test
  • 27. SUMMARY
    • Spectra CX 3.2 includes the SCA Test feature which provides for:
      • Standalone, unit testing of components
      • Implementation independent, black box, testing using JUnits
      • On-host or on-target using TargetLoader in place of a Core Framework
      • Basic component lifecycle interface testing -- 32 test cases
      • The addition of user-defined test cases (JUnits)
    • Future releases will expand the test coverage with cases for
      • Complete Lifecycle interface testing – 129+ test cases
      • Components, Assemblies, and Applications
      • Platforms: Core Framework, Services, …
    • We will also improve the testing capability with
      • SCA-specific JUnit framework – easier to create test cases
      • Support testing profiles -- standard (e.g. SCA, SCA-Next) and custom
      • Support for test hardware
  • 28. Additional Information
    • For additional information on PrismTech’s Spectra products and services:
      • E-mail:
        • [email_address]
      • Website:
        • http://www.prismtech.com
  • 29. THANK YOU
    • Mike Williams Spectra CX, Product Management
    • [email_address]