Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Vidiom Systems Corp., 2004 AutoXlet Framework Requirements Framework design Xlet Script Test Results and Logging Synchronization control Examples Configure,

Similar presentations


Presentation on theme: "© Vidiom Systems Corp., 2004 AutoXlet Framework Requirements Framework design Xlet Script Test Results and Logging Synchronization control Examples Configure,"— Presentation transcript:

1 © Vidiom Systems Corp., 2004 AutoXlet Framework Requirements Framework design Xlet Script Test Results and Logging Synchronization control Examples Configure, build, and run Status and goals

2 © Vidiom Systems Corp., 2004 AutoXlet Requirements Automate test Xlet launching and the dispatching of remote control events Make test Xlets deterministic with definitive PASS/FAIL results using JUnit-like asserts Be able to run tests and report results in release/production mode Make it relatively simple for existing Xlets to be integrated into the automated framework Test Xlets must still function manually

3 © Vidiom Systems Corp., 2004 Design Authors – Greg Rutz, Mark Mindenhall, Francesco Dorigo Components –XML Event Scripts –XletDriver –Driveable Interface –AutoXletClient

4 © Vidiom Systems Corp., 2004 Design Diagram by Greg Rutz XletDriver TestXlet AutoXletClient XML Event Script Xlet List Remote Control Events Logging Mech. Test Results Log Statements IXCIXC

5 © Vidiom Systems Corp., 2004 Xlet Scripts Simulating Remote Control Events Extensible Xml format Root element – AutoXlet consists of one or more Xlet tags –Xlet attributes – name, org id, app id, pauseAfterLast An Xlet consists of zero or more RCEvent tags which correspond to org.ocap.ui.event.OCRcEvent –RCEvent attributes – name, pauseBeforeNext, monitorTimeout, getResultsAfter 1 new element since release – Repeat –Allows you to repeat a sequence of RCEvents

6 © Vidiom Systems Corp., 2004 Example Script VK_CHANNEL_UP VK_CHANNEL_UP VK_CHANNEL_DOWN VK_CHANNEL_DOWN VK_3 VK_CHANNEL_UP VK_CHANNEL_DOWN VK_2

7 © Vidiom Systems Corp., 2004 XletDriver Controls Xlet Automation Loads Xlets from Xml script file Sends remote control events to an Xlet Sets up UDP Logging and results recording Sets up IXC communication to the Xlets for logging and results recording Configurable with a set of properties in hostapp.properties

8 © Vidiom Systems Corp., 2004 Example hostapp.properties ############################################ ## Application 0 ## The following Xlet arguments are used to configure the XletDriver: ## ## XletDriverScript=[Path to script file] ## -- Specfies the location of the XML script file. ## ## DebugFile=[Path to debug file] ## -- Specifes the location of a local file to which the Xlet driver will ## write Xlet debugging log statements ## ## DebugServer=[IP or name of UDP debug log server] ## -- Specifies the IP address or hostname of the UDP log server to which the Xlet ## driver will write Xlet debugging log statements. If DebugFile argument is ## present, this argument is ignored. ## ## DebugPort=[Port] ## -- Specifies the port number of the UDP log server to which the Xlet driver ## will write Xlet debugging log statements. If DebugFile argument is present, ## this argument is ignored. If DebugServer argument is present, this argument ## must be present. ## ## ResultsFile=[Path to results file] ## -- Specifes the location of a local file to which the Xlet driver will write ## Xlet test results statements ## ## ResultsServer=[IP or name of UDP results server] ## -- Specifies the IP address or hostname of the UDP log server to which the Xlet ## driver will write Xlet test results statements. If ResultsFile argument is ## present, this argument is ignored. ## ## ResultsPort=[Port] ## -- Specifies the port number of the UDP log server to which the Xlet driver ## will write Xlet test results statements. If ResultsFile argument is present, ## this argument is ignored. If ResultsServer argument is present, this argument ## must be present. ## ## It is very important to always signal the XletDriver application with the following ## AppID and OrgID values. The AutoXletClient object used by each test xlet assumes ## that XletDriver has a particular set of IDs so that it can establish communication ## via IXC. ## ## XletDriver: ## OrgID = 0x1 AppID = 0x7000 ## ############################################### app.0.application_identifier=0x000000017000 app.0.application_control_code=AUTOSTART app.0.visibility=VISIBLE app.0.priority=220 app.0.application_name=XletDriver app.0.base_directory=/syscwd/qa/xlet app.0.initial_class_name=com.vidiom.test.autoxlet.XletDriver app.0.args.0=XletDriverScript=XletDriver.xml app.0.args.1=ResultsFile=Results.txt app.0.args.2=DebugFile=Debug.txt

9 © Vidiom Systems Corp., 2004 Driveable Interface Provides an Xlet a method for receiving and interpreting key events Indicates whether the key events should behave synchronously using a Monitor –Monitor parameters are passed directly from XML script. public interface Driveable extends Remote { /** /** * Dispatches a java.awt.event.KeyEvent to the object with suggested * Dispatches a java.awt.event.KeyEvent to the object with suggested * monitor configuration information * monitor configuration information * * @param event the event being dispatched * @param event the event being dispatched * @param useMonitor true if the command initiated by this event should * @param useMonitor true if the command initiated by this event should * use a monitor object to enfore synchronous behavior, false otherwise * use a monitor object to enfore synchronous behavior, false otherwise * @param monitorTimeout the monitor object timeout in milliseconds * @param monitorTimeout the monitor object timeout in milliseconds */ */ void dispatchEvent(KeyEvent event, boolean useMonitor, int monitorTimeout) void dispatchEvent(KeyEvent event, boolean useMonitor, int monitorTimeout) throws RemoteException; throws RemoteException;}

10 © Vidiom Systems Corp., 2004 AutoXletClient Initiates IXC communication to the XletDriver for logging and test results reporting Reports connectivity state between client and driver. Xlets can report their own test results and instantiate their own logging object when not running under the XletDriver. Provides a Test object for making JUnit- like assert statements Provides Logger object established by the XletDriver

11 © Vidiom Systems Corp., 2004 Logging Logger object is provided by the AutoXletClient, when connected. Xlets can create their own XletLogger object when running manually UDP Logger and UDP LogServer available for running test Xlets in release environments. Logger interface provides: public void log(TestResult testResults); public void log(String message); public void log(Exception e);

12 © Vidiom Systems Corp., 2004 TestResults Accessible via the Test object Keeps counts of successes and failures from assert statements When running under the XletDriver, results automatically written to a log in the format of JUnit results –At the end of a particular Xlet run –When a RCEvent tag indicates that results should be output When running manually, TestResults can be logged by the Xlet author by passing the results object to the Logger

13 © Vidiom Systems Corp., 2004 AutoXlet Examples PropertiesTestXlet TuneTestXlet

14 © Vidiom Systems Corp., 2004 Configuring an AutoXlet Instrument an Xlet with the AutoXlet framework objects and add assert test statements Add your Xlet to the hostapp.properties file in $OCAPROOT/apps/qa/AutoXlet Provide an AutoXlet Xml events file Add the Xlet xml from your Xlet to the master AutoXlet xml file in $OCAPROOT/apps/qa/AutoXlet

15 © Vidiom Systems Corp., 2004 Building an AutoXlet AutoXlet code is in $OCAPROOT/apps/qa/AutoXlet From the top level: $ omake build.autoxlet.image – builds 4 site specific images Class files are written to $OCAPROOT/bin/$OCAPTC/qa/xlet including the AutoXlet framework classes needed Driver Xml and hostapp.properties are copied to $OCAPROOT/bin/$OCAPTC/qa/xlet/AutoX let

16 © Vidiom Systems Corp., 2004 Status and Goals Xlets automated include: –PropertiesTestXlet –PermissionsTestXlet –FileAccessPermissionsTest –TuneTestXlet –ServiceListXlet –ObjectCarouselTestXlet –DvrTestRunner All new Xlet automated


Download ppt "© Vidiom Systems Corp., 2004 AutoXlet Framework Requirements Framework design Xlet Script Test Results and Logging Synchronization control Examples Configure,"

Similar presentations


Ads by Google