SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jan 2000
    Location
    London,UK
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Conditionally Loading Include Files

    Hi, I am having trouble condtionally loading include files, I am specifically trying to use expressions as a constant - I get messages like -

    USE argument must resolve to a constant string: use G_SDMFile

    in another include I have these lines.

    const G_MyDSN = "dsn=BetaOne"
    const G_DATFile = GetField(G_MyDSN, "=", 2)

    which will return "BetaOne"

    I have two compiler constants, they are:
    BetaOne = "C:\betascript\BetaOne.inc"
    BetaTwo = "C:\betascript\BetaTwo.inc"

    - has anyone got any suggestions or answers.

    the names have been changed but the scenario is accurate.

    What I am aiming to do is in a users personal settings file allow them to set what Include file to use based on what version they are running the test against.

    The G_MyDSN constant is used to point to a different access database that drives the scripts.

    Thanks
    WayneTaylorUK

  2. #2
    Member
    Join Date
    Jan 2000
    Location
    London,UK
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Conditionally Loading Include Files

    Sorry, I mis-used this feature I now have the desired effect.

    ...but, if anyone has an answer to my original question, I would be grateful, I wanted the same functionality using the method below.

    Thanks Wayne Taylor - Test Analyst

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by waynetayloruk:
    Hi, I am having trouble condtionally loading include files, I am specifically trying to use expressions as a constant - I get messages like -

    USE argument must resolve to a constant string: use G_SDMFile

    in another include I have these lines.

    const G_MyDSN = "dsn=BetaOne"
    const G_DATFile = GetField(G_MyDSN, "=", 2)

    which will return "BetaOne"

    I have two compiler constants, they are:
    BetaOne = "C:\betascript\BetaOne.inc"
    BetaTwo = "C:\betascript\BetaTwo.inc"

    - has anyone got any suggestions or answers.

    the names have been changed but the scenario is accurate.

    What I am aiming to do is in a users personal settings file allow them to set what Include file to use based on what version they are running the test against.

    The G_MyDSN constant is used to point to a different access database that drives the scripts.

    Thanks
    WayneTaylorUK
    <HR></BLOCKQUOTE>


  3. #3
    Member
    Join Date
    Dec 1999
    Location
    Rochester, NY, USA
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Conditionally Loading Include Files

    I recommend that you create a support script to create a runtime-manufactured include file. Then pack the support script and your test script into a suite file. For example:

    YourScript.t:

    or
    SuiteSupport.t:

    or
    YourSuite.s:

    This method was used because the Plan files in QAPartner seemed quite awkward. Later on it proved very useful because of differing versions of software.

    I have found the following benefits resulting from this method: 1) data-driven test cases requiring different include files; 2) reduce support file collisions (many files utilize msw32.inc at different levels); 3) allow code to be reused across multiple projects; 4) differing versions of software can be handled.

    Generally, I am pulling information from various ODBC data sources. But sometimes it is much simpler like when files must be checked for include file collisions.

    Hopefully this helps!


    [This message has been edited by AJBachman (edited 09-12-2000).]
    Andy Bachman

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 07:40 PM.

Copyright BetaSoft Inc.