Results 1 to 7 of 7
  1. #1

    Using test plan attributes inside testcase

    Is it possible to read attribute values defined in test plan inside the test case or user-defined recovery system? If yes, how to do it?

  2. #2

    Re: Using test plan attributes inside testcase

    Attributes are used generally to define properties of the test rather than pass data to the test. If you want to pass data from the test plan to the test script then use test data rather than attributes. You will need to specify that the test accepts data.


    testcase YourReferenceSearch (inputA, inputB) appstate none
    The shortest distance between two points is under construction.

  3. #3

    Re: Using test plan attributes inside testcase

    Thank you Nick for clarifying. Currently I am using Excel sheet for getting test data. Querying the data is taking 2 seconds for each test case and having a set of 400+ test cases increasing the test run times. I wanted to reduce the time of execution and thought of using test plan and verify the times

    I have another question after going through silk test help)

    If i want to group test data to several sub groups, it asked to define symbols, but didn't given any example to do that. Can you provide one?

    Extracted From Silk Test Help:

    Specifying unique and shared data
    If a data value is unique to a single test description: you should place it in the plan at the same level as the test description, using the testdata statement. You can add the testdata statement using the Testplan Detail dialog or type the testdata statement directly into the testplan.

    If data is common to several tests: you can factor out the data that is common to a group of tests and define it at a level in the testplan where it can be shared by the group. To do this, you define symbols and assign them values. Using symbols results in less redundant data, and therefore, less maintenance.

  4. #4

    Re: Using test plan attributes inside testcase

    Hi Naresh,

    I'm not sure what is meant by symbols in the help file but you can use test data as follows in your test plan:-

    [ ] script: MyScript.t
    [ ] testdata: {one, two, three}
    [-] // Internal User
    [-] Agreement1
    [ ] testcase: RunAgreement1
    [-] Agreement2
    [ ] testcase: RunAgreement2
    [-] Agreement3
    [ ] testcase: RunAgreement3
    [-] Agreement4
    [ ] testcase: RunAgreement4

    In the above plan, the testdata: {one, two, three} would be used as input to all of the testcases below it. Did you try running the data driven workflow with your excel spreadsheet?
    The shortest distance between two points is under construction.

  5. #5

    Re: Using test plan attributes inside testcase

    I haven't used datadriven method, but queried excel sheet as a database table and created dictionary collection objects in required format.

  6. #6

    Re: Using test plan attributes inside testcase

    Symbols are straightforward, and quite easy to use:
    <font class="small">Code:</font><hr /><pre>
    [+] Restore databases from backups
    [ ] $BackupDir = "C:\DBBackups\Build_456"
    [ ] $DBMS = "Ora11g"
    [ ] // $DBMS = "SS2K8"
    [ ] $FileName = ""
    [+] Restore, Upgrade and Backup Databases
    [ ] script: DBUtils.t
    [ ] testcase: RestoreDB_FromDir ($FileName,$BackupDir,$DBMS)
    [ ]
    [+] SalesOrds
    [ ] $FileName = "SO.bak"
    [+] PurchOrds
    [ ] $FileName = "PO.bak"
    [+] SalesLedger
    [ ] $FileName = "SL.bak"
    [+] PurchLedger
    [ ] $FileName = "PL.bak"

    </pre><hr />
    They are declared with a leading '$'. That's about all there is to it; although the sample above barely hints at what you can do with them.


  7. #7

    Re: Using test plan attributes inside testcase

    Thank you Peat. I went into the help again after seeing your response, and found there are separate topics for "symbol" alone.

    I am kind of digressing from the thread topic! After seeing your example, I am curious to see database actions on SQL server.

    Are you performing restore, upgrade and backup through command line, or you have automated sequence on SQL Server? Is it possible to share the database actions code?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 03:32 PM.

Copyright BetaSoft Inc.