DIVA Test Automation feat. xTitan

From OO Lab
Revision as of 00:19, 22 May 2012 by Lukefan (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Introduction

DIVA Test Automation uses the technology of Capture-Replay, making you able to "Capture" the correct execution of DIVA first, then after you made some changes to DIVA, you can "Replay" the previously recorded execution to see if your change can pass everything that was passed in the previously correct execution.

Getting ready: DIVA

  • First of all you need to use subversion to checkout / update / merge the newest version of branch_QtGUI to your local working copy.
    • If you find out that there's a folder called "xTitan" under the root of the branch, you are on the right track.
    • The folder "xTitan" contains headers and built library files that are necessary for building DIVA. It is the Test Automation maintainer's duty to update the content of this folder to ensure the functioning of Test Automation is up-to-date. For more information, see DIVA Test Automation Maintainer's Guide.

Branch QtGui withTestAutomation.jpg

  • If you have svn conflict problem, please follow the instruction in Diva/Merge Guide - Test Automation.docx to resolve it.
  • Open Diva/scripts_vc10.0/Qt.sln and try to build and run. If nothing goes wrong, your DIVA is ready for recording and replaying test cases with xTitan.
    • If you have build / runtime error, please follow the instruction in Diva/readme20120331_testAutomation.docx to resolve it.

Getting ready: xTitan

You need to build xTitan manually and since it is a bit complicated work, please see Build DIVA-supported xTitan.

Record a Test Case

If you had followed the instructions in Build DIVA-supported xTitan, you shall see "xTitanServer.exe" under the "xTitan/bin" folder of your program files.

XTitanServerEXE.jpg

Double-click the "xTitanServer.exe" and you will see a GUI like this:

XTitanServerGUI.jpg

Click Edit > Preference, you will see a dialog for setting the software path and test case path, follow the instruction below to fill in the text field then click "ok":

  • Software Path: Find the location of DIVA_Qt.exe. It is located under the "$(OGRE_HOME)/bin/Debug" folder, where $(OGRE_HOME) represents the root folder of your OGRE installation. For example, in my case, the location is C:/Ogre1.7/OgreSDK_vc10_v1-7-4/bin/debug/DIVA_Qt.exe
  • Test Case Path: All the recorded test cases will be put here. It has no dependency to any other settings, so it is completely up to you to decide the path here.

XTitanPreference.jpg

Currently we are unable to record / replay the operations on MappingDialog. So we rely on the MDS mechanism to run the test automation. Therefore, before recording a test case, make sure you have enabled the MDS entry for the type of variable you wanted to visualize. For more information, please refer to this tutorial

Now we are ready to record a test case, click "start" and wait for a few second you will see DIVA main window.

  • If you found out xTitan is unable to start DIVA, it's probably because the rendering engine configuration has messed up. Try starting "DIVA_Qt.exe" manually and it will lead you to setup the configuration. If it succeeds then you can try starting DIVA by xTitan again, it SHOULD work this time.

XTitanStart.jpg

Start the xDIVA front-end, e.g. Minerva, Visual Studio or Eclipse, and start interacting with DIVA.

When you've finished recording, just click "stop and save" and follow the instruction to save the test case.

XTitanStop.jpg

XTitanSave.jpg

Replay a Test Case

In the xTitan main window, click "Replay".

XTitanReplay.jpg

Click "Specific Test"

XTitanSpecificTest.jpg

Select the test case you want to replay, then click "OK"

  • If you found out xTitan is unable to start DIVA, it's probably because the rendering engine configuration has messed up. Try starting "DIVA_Qt.exe" manually and it will lead you to setup the configuration. If it succeeds then you can try starting DIVA by xTitan again, it SHOULD work this time.

XTitanSelectTestCase.jpg

You shall see xTitan successfully starts DIVA and replay the test case now.

Personal tools