Вы находитесь на странице: 1из 13

Endpoint Automation Bridge

Rohinton Daruwala
Sr. Software Engineer

Presentation Identifier Goes Here 1


Agenda

1 Automation Architecture

2 Python Bridge

3 Command Providers

Presentation Identifier Goes Here 2


Current Architecture

Endpoint
Automation Driver Scripts

Exactor STAF

STAF

Endpoint Automation Framework 3


New Architecture

Endpoint
Automation Driver Command
providers
Exactor STAF

STAF

Endpoint Automation Framework 4


Python Bridge

Presentation Identifier Goes Here 5


Design Motivations
• Enable test writers to add commands with minimum plumbing
and simple command structure
• Support calling of commands from existing test framework
• Bridge should also be useable as a separate component
• Support multiple platforms

Presentation Identifier Goes Here 6


Bridge Responsibilities
• Multiple Command Providers
• Command Parameter Verification
• Support out parameters
• Error Reporting
• Operation logs
• Timing and Performance counters

Presentation Identifier Goes Here 7


Command Providers

Presentation Identifier Goes Here 8


Command Provider
• Provider Configuration File
– An XML configuration file that specifies which commands are supported,
input and output parameters and error codes
• Command Handlers
– Each command is implemented in a command handler file which is a
python module
• Other Python Modules
– Additional modules containing code common across command handlers
• ErrorCodeStart.ini
– Error code must be kept unique across command providers.
– This is stored in a central file – errorCodeStart.ini

Presentation Identifier Goes Here 9


Command Provider XML Configuration
<CommandProvider>
<Commands>
        
<Command name = "SendMail">
            <Parameters>
                <Parameter name = "To" type = "string" required = "true"/>
                <Parameter name = "Subject" type = "string" required = "false"/>
                <Parameter name = "Body" type = "string" required = "false"/>
            </Parameters>
        </Command>
 
</Commands>
    <Errors>
        <Error code = "4101" text = "Outlook not installed"/>
    </Errors>
</CommandProvider>

Presentation Identifier Goes Here 10


Command Handlers
• Command handlers are module files implementing a single
method –
HandleCommand(logger, parameters)

Presentation Identifier Goes Here 11


Bridge Elements
• External Service Caller (STAF)
– External service calling the bridge, for the endpoint automation
framework this is STAF
• Provider Manager
– The central controlling module that handles the command providers and
exposes them to the external caller in a predictable format
• Command Loader
– This module parses command provider configurations and loads
command handlers during the init.phase
• Parameter Parser
– Responsible for verifying parameters passed to a command
• Command Executor
– Responsible for executing a command, and verifying output parameters

Presentation Identifier Goes Here 12


Thank you!
Rohinton Daruwala

Copyright © 2010 Symantec Corporation. All rights reserved. Symantec and the Symantec Logo are trademarks or registered trademarks of Symantec Corporation or its affiliates in
the U.S. and other countries.  Other names may be trademarks of their respective owners.

This document is provided for informational purposes only and is not intended as advertising.  All warranties relating to the information in this document, either express or implied,
are disclaimed to the maximum extent allowed by law.  The information in this document is subject to change without notice.

Presentation Identifier Goes Here 13

Вам также может понравиться