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
    Sep 2004
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Setting Expected Date Entries

    Hi Folks,

    I am having a problem with setting dates.

    I need to be able to compare my expected results
    which are contained in a text file against the actual results.

    The problem i'm having is how do I set an expected date in my text file just once e.g system date minus 6 days.

    I can enter the expected date in e.g 17-09-04 in the text file which would be fine if i executed the test today, however if i execute the test tomorrow then i would need to change my expected date in the text file to 18-09-04. I can do it this way but as I have many tests to run which require dates is there a easier way to be able to enter the expected date in the text file to identify a required expected date in relation to the system date.

    Any help is much appreciated.

    Thanks
    Dharminder

  2. #2
    Senior Member
    Join Date
    Jan 2003
    Location
    West Bloomfield, MI
    Posts
    199
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Setting Expected Date Entries

    DateRet = CreateDate("04/09/98","MM/DD/YY","aged","today - 6 days")

    If you put this into the script it will take the system date as today and return the date of 6 days previous.

    Parameter Values in this case:
    "04/09/98" - irrelavent
    "MM/DD/YY" - format you want the date returned. This can be changed ie MM/DD/YYYY for a 4 digit year
    "aged" - irrelevant
    "today - 6 days" - tell QARun what difference from today. It can be + or - or just today

    By using this function you don't need to put the dates into the data file if you don't want to...

    If it has to be in a data file, then you can put "today - 6 days" into the data file and then have a function to read that in and build the QARun function CreateDate on the fly...

    DateFromFile = (in data file: "Today - 6 days")

    DateRet = CreateDate("04/09/98","MM/DD/YY","aged",DateFromFile )


    Nanook

  3. #3
    Junior Member
    Join Date
    Sep 2004
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Setting Expected Date Entries

    Thank you for your quick response

    I need the date from the screen (actual result) to be compared with the date from the data file (expected result) which is where the problem is.

    So the data file has to be created first, the test program will then check to see if the comparison is correct but as i cannot use the date in a date format as it can be dynamic according to when the program is executed.

    I need the comparison to be in relation to the system date which I have already calculated in my function.

    Thanks again in advance
    Dharminder

  4. #4
    Junior Member
    Join Date
    Jun 2002
    Location
    Lexington, KY
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Setting Expected Date Entries

    What Nanook is saying is you don't need a data file, or what needs to be in your data file is the number of days to age the date.

    QARun can get today's date. So by using the CreateDate() function you are creating your expected result. Take that value and compare it to your actual value.

 

 

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 06:33 AM.

Copyright BetaSoft Inc.