发布新日志

  • CubicTest 录制测试

    2009-02-17 11:07:44

    【转载】

    http://boss.bekk.no/display/BOSS/CubicTest+-+Tutorial

    Recording tests

    Alternatively to creating a test manually (as described above), tests can be recorded by interacting with an existing web application.

    The recorder requires that Firefox or Opera is installed. 

    To record a test,

    1. Right click in the background of a Test and choose "Record" (or right click on an arbitrary Page/State and choose "Record from this Page/State")
      Firefox/Opera will open and load the start point URL.
    2. To record page element assertions, right click on the page in Firefox on "page elements" (e.g. a link) and choose e.g. "Assert link present".
      To record text-present-assertions, first highlight/select the text and then right click and choose "assert text present".
    3. To record user interactions, interact with the page as normal. The interactions will be recorded, and "click" events will trigger the transition to a new state. Text input will not automatically trigger a transition to a new state. Observe that user interactions are added to the Cubic test model in the background.

    To stop recording,

    1. Right click in the graphical test editor -> toggle "Record" off.
  • Selenium RC的安装,配置和交互

    2009-02-13 18:10:55

    【转载】

    Hi All,
     
    In this article I will tell you how you can install and use Selenium RC(the best open source web testing tool and multi browser testing). I have been using Selenium RC for a while now and found it very useful to test web based applications. I have found that there is no installation and user guide for Selenium RC.
     
    First download selenium-remote-control-1.0-SNAPSHOT i.e. the nightly build from the http://seleniumrc.openqa.org/download.html. There is some issue with Version 1.0 beta 1 (run time error when running on IE browser).
     
    This is a zip file so, unzip the file and save it in ur c drive (Folder selenium-remote-control-1.0-SNAPSHOT).  Create a folder called Seleniumin your c drive and a sub folder called tests in c:\Selenium. Save all you selenium scrīpts in C:\Selenium\Tests\. 
     
    Before runing first thing is close all Firefox browser windows and follow the instructions given below.
     
    Open the Windows "Start" menu, select "Run" (on Windows Vista, use "Start Search" or enable the Run box, as described here) then type and enter one of the following:

        * firefox.exe -profilemanager
        * firefox.exe -P
     
    For more details go to http://kb.mozillazine.org/Profile_Manager
     
    When creating the profile manager you will have to create it under  a new folder C:\Firefoxselenium.
     
    Once the profile manager is created you will have to create two batch file (.bat); one for IE and the other for Firefox.
     
    This is an example of the SeleniumFirefox.bat file.
     
    cd
    \ cd C:\selenium-remote-control-1.0-SNAPSHOT\selenium-server-1.0-SNAPSHOT
    java -jar selenium-server.jar -port 4545 -firefoxProfileTemplate C:\Firefoxselenium -htmlSuite chrome http://www.yourtestwebsite.com// C:\selenium\G_alltestff.html* C:\selenium\*Results.html*
    pause 
     
    This is an example of the SeleniumIE.bat file.
     
    cd
    \ cd C:\selenium-remote-control-1.0-SNAPSHOT\selenium-server-1.0-SNAPSHOT
    java -jar selenium-server.jar -port 4545  -htmlSuite iehta http://www.yourtestwebsite.com// C:\selenium\G_alltestie.html* C:\selenium\*Results.html*
    pause 
     
    Next step is to create G_alltestff.html (For Firefox)
     
    <html>
    <head>
    <meta content="text/html; charset=ISO-8859-1"
    http-equiv="content-type">
    <title>Test Suite</title>
    </head>
    <table id="suiteTable"    cellpadding="1"
               cellspacing="1"
               border="1"
               class="selenium">
            <tbody>
                            <tr><td><b>Test Suite</b></td></tr>
                                <tr><td><a href=".\Tests\Name of you selenium scrīpt.html">Name of the scrīpt</a></td></tr>
        </tbody>
      </table>
    </body>
    </html>
     
    Next step is to create G_alltestie.html (For Firefox)
     
    <html>
    <head>
    <meta content="text/html; charset=ISO-8859-1"
    http-equiv="content-type">
    <title>Test Suite</title>
    </head>
    <table id="suiteTable"    cellpadding="1"
               cellspacing="1"
               border="1"
               class="selenium">
            <tbody>
                            <tr><td><b>Test Suite</b></td></tr>
                                <tr><td><a href="C:\Selenium\Tests\Name of you selenium scrīpt.html">Name of the scrīpt</a></td></tr>
        </tbody>
      </table>
    </body>
    </html>
     
    Once you have done this you are all set to rock and roll. To run Selenium RC on Firefox double click on  SeleniumFirefox.bat file and to run Selenium RC on IE double click on  SeleniumIE.bat. Selenium RC is a very useful tool and I feel it’s very stable that Selenium IDE.
     
    I would also like to thank my colleague Wedi Wun for helping me write the Selenium RC installation and user guide.To know more about Selenium RC/IDE Data driven testing see my article Data Driven Selenium using Excel Macros.
     
    Cheers
    Pavan Puddupakkam

Open Toolbar