SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Mar 2004
    Location
    Pennsylvania
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    QTP Checkpoints in TestComplete

    What is the equivalent of QTP checkpoints in TestComplete?

  2. #2
    Senior Member
    Join Date
    May 2002
    Location
    Las Vegas, NV, USA
    Posts
    499
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Checkpoints in TestComplete

    Hi,

    Please take a look at the 'Store Object Properties' feature of TestComplete. When recording a script, a user can press the 'Store Object Properties' button on the Recording toolbar to automatically save the values of a number of object properties and insert the appropriate code to the script. This code will compare the current values of the properties with the baseline set during the test execution. It is possible to edit these saved properties manually via the Objects page of the Stores panel.
    Our tool also allows the user to compare the image of the whole screen or a separate window with the master image and even search for a small template image inside another image.
    Please see the 'Stores Panel' help topic for more details about these features.

    In addition to these possibilities, you can create your own functions and procedures using one of the available scripting languages to check the state of the application under test.
    Regards,
    Bobby Edgar
    Olagoo.com
    Save on AutomatedQA Products

  3. #3
    Junior Member
    Join Date
    Mar 2004
    Location
    Pennsylvania
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Checkpoints in TestComplete

    Hi Bob,

    Do you have a sample verification script using VBScript just to start with? I believe the main function here is "compare" right?

    I'll appreciate if you can provide a sample scripts for the ff:
    - Text Verification
    - Buttons Verification
    - Image Verification

    Another thing is How can I show to the test log that I verify this and that and it's passed or fail?

  4. #4
    Member
    Join Date
    Feb 2003
    Location
    Frisco, TX, USA
    Posts
    68
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Checkpoints in TestComplete

    Hi,

    Bobby is on vacation, so you'll have to contend with me.

    Do you have a sample verification script using VBScript just to start with?
    <font size="2" face="Verdana, Arial, Helvetica">I've created a simple script that works with notepad and can show you the main principle of how you can verify text and then post the report to the Test Log. Please note that this script uses functions from the Utilities and Win32API plug-ins. Before running it, make sure that these plug-ins are installed and active on your computer. You can do this in the 'Extensions' dialog: select the 'Install Extensions...' item from the File menu to open it.

    [VBScript]
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Sub Main
    ' Set variables
    SomeText = &quot;AutomatedQA Corp. TestComplete 3&quot;
    PathToFile = &quot;c:\testcomplete.txt&quot;

    ' Delete the &quot;c:\testcomplete.txt&quot; file if it exists
    if Utilities.FileExists(PathToFile) then Utilities.DeleteFile(PathToFile)

    ' Call the below procedures
    Call EnterText(SomeText, PathToFile)
    Call ValidateText(SomeText, PathToFile)
    End Sub

    ' This procedure runs Notepad, types some text and saves it to the file
    Sub EnterText(SomeText, PathToFile)
    ' Run Notepad
    Call Win32API.WinExec(&quot;notepad&quot;, SW_SHOW)
    Set p = Sys.Process(&quot;notepad&quot
    Set w = p.Window(&quot;Notepad&quot;, &quot;*&quot
    w.Activate

    ' Enter a text to Notepad
    Call Sys.Keys(SomeText)

    ' Save the text to the file
    Call w.MainMenu.Click(&quot;File|Save As...&quot
    Set w = p.Window(&quot;#32770&quot;, &quot;Save As&quot
    w.Activate
    Call Sys.Keys(PathToFile)
    w.Window(&quot;Button&quot;, &quot;&amp;Save&quot.Click

    ' Close Notepad
    Set w = p.Window(&quot;Notepad&quot;, &quot;*&quot
    w.Activate
    Call w.MainMenu.Click(&quot;File|Exit&quot
    End Sub

    ' This procedure runs Notepad, opens the saved file and validate its contents
    Sub ValidateText(SomeText, PathToFile)
    ' Run Notepad
    Call Win32API.WinExec(&quot;notepad&quot;, SW_SHOW)
    Set p = Sys.Process(&quot;notepad&quot
    Set w = p.Window(&quot;Notepad&quot;, &quot;*&quot
    w.Activate

    ' Open the file
    Call w.MainMenu.Click(&quot;File|Open...&quot
    Set w = p.Window(&quot;#32770&quot;, &quot;Open&quot
    w.Activate
    Call Sys.Keys(PathToFile)
    w.Window(&quot;Button&quot;, &quot;&amp;Open&quot.Click
    Set w = p.Window(&quot;Notepad&quot;, &quot;*&quot
    w.Activate

    ' Validate the text in Notepad
    if w.Window(&quot;Edit&quot;, &quot;&quot;, 1).wText = SomeText then
    ' Post message to the Test Log
    Call Log.Message(&quot;Text is correct&quot;, w.Window(&quot;Edit&quot;, &quot;&quot;, 1).wText)
    else
    Call Log.Message(&quot;Text is incorrect&quot
    end if

    ' Close Notepad
    Call w.MainMenu.Click(&quot;File|Exit&quot
    End Sub</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">You can enable the 'Highlight execution point' and 'Delay between events' options in order to see which line of code executes a specific action.
    The first option can be enabled in the 'Editor' dialog: select the 'Options…' item from the Editor panel's context menu to open it.
    To enable the second option, you should open the 'Engine Options' dialog; select the 'Engine Options…' item from the Options menu. Then click Run (at the left side of the dialog) and set the delay time in milliseconds as the value of the 'Delay between events' option.

    I believe the main function here is "compare" right?
    <font size="2" face="Verdana, Arial, Helvetica">Yes, TestComplete has such functions. They are:
    - Utilities.CompareStr
    - Utilities.CompareText
    These two functions are almost the same. Please see the 'Utilities.CompareStr' and 'Utilities.CompareText' help topics for details.

    - Files.Compare
    This function allows you to compare two files. Please see the 'Files.Compare' and 'How to Compare Files' help topics for details.

    - Regions.Compare
    This function is used to compare two images. See the 'Regions.Compare' help topic.


    I'll appreciate if you can provide a sample scripts for the ff:
    - Text Verification
    - Buttons Verification
    <font size="2" face="Verdana, Arial, Helvetica">I think that these two verifications are of the same type and you can learn how they can be performed from the script above. The only difference is that when you verify the caption of the button you should get the WndCaption property instead of the wText property:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">if w.Window(&quot;Button&quot;, &quot;*&quot.WndCaption = &quot;Open&quot; then Log.Message(&quot;OK&quot</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
    - Image Verification
    <font size="2" face="Verdana, Arial, Helvetica">Please read the 'How to Compare and Find Images' topic. It describes this subject in detail.


    Another thing is How can I show to the test log that I verify this and that and it's passed or fail?
    <font size="2" face="Verdana, Arial, Helvetica">You can post errors, warnings and other messages to the Test Log. See the 'Log Object' help topic to study how to work with TestComplete's Test Log. Please note the main methods of this object: Message, Event, Warning and Error. TestComplete also has a sample project that demonstrates the abilities of the Test Log panel. It is located in the
    '<TestComplete>\Samples\Scripts\Test Log\VBScript' folder.

    BTW, I recommend that you look through TestComplete's 'Basic Features' and 'Advanced Features' tutorials. They help a newbie to quickly get acquainted with our tool and study its major features. You can start the tutorials by selecting the corresponding items of the Tutorials submenu of the Help menu.
    Robert Leahey - TeamAQA
    Thoughtsmithy Software
    Note: I am not an employee of AutomatedQA - my support here is on a volunteer basis.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:23 AM.

Copyright BetaSoft Inc.