Loading ...
Sorry, an error occurred while loading the content.

Assigning value of one variable to another

Expand Messages
  • andrei_oleinik
    Is it possible to assign value of one variable to another? The syntax: !define varnameB { ${varnameA} } doesn t work. The situation is. We have several test
    Message 1 of 4 , Jun 2, 2005
    View Source
    • 0 Attachment
      Is it possible to assign value of one variable to another?

      The syntax: '!define varnameB { ${varnameA} }' doesn't work.

      The situation is. We have several test suits running against
      different databases. In fact, tests differ just with database URL, so
      they are organized as include files using variable 'URL' for DB
      connection.
      At the moment it looks like this:

      Test suite 1:

      !define URL {...url for sql server db...}

      test1
      test2
      test3

      Test suite 2:

      !define URL {... url for oracle db ...}

      test1
      test2
      test3


      As test suites can be downloaded from central fitnesse server and run
      against locally installed databases, the value of URL variable needs
      to be changed for each suite every time.

      The idea is define variables (constants) on the root page, and assign
      these constants to URL variable in each suit.

      root page:

      !define SQLServerURL {... url for sql server db ...}
      !define OracleURL {... url for oracle db ...}

      Test suite 1:

      !define URL { ${SQLServerURL} }

      test1
      test2
      test3

      Test suite 2:

      !define URL { ${OracleURL} }

      test1
      test2
      test3

      This would prevent modifying URL for each individual suit.

      Are there other ways/patterns on this issue?
    • Micah Martin
      Use parens on the definition... !define varnameB ( ${varnameA} ) Micah Martin Object Mentor, Inc. www.objectmentor.com
      Message 2 of 4 , Jun 8, 2005
      View Source
      • 0 Attachment
        Use parens on the definition...

        !define varnameB ( ${varnameA} )


        Micah Martin

        Object Mentor, Inc.

        www.objectmentor.com



        On Jun 2, 2005, at 2:56 AM, andrei_oleinik wrote:

        Is it possible to assign value of one variable to another?

        The syntax: '!define varnameB { ${varnameA} }' doesn't work.

        The situation is. We have several test suits running against 
        different databases. In fact, tests differ just with database URL, so 
        they are organized as include files using variable 'URL' for DB 
        connection.
        At the moment it looks like this:

        Test suite 1:

        !define URL {...url for sql server db...}

        test1
        test2
        test3

        Test suite 2:

        !define URL {... url for oracle db ...}

        test1
        test2
        test3


        As test suites can be downloaded from central fitnesse server and run 
        against locally installed databases, the value of URL variable needs 
        to be changed for each suite every time.

        The idea is define variables (constants) on the root page, and assign 
        these constants to URL variable in each suit.

        root page:

        !define SQLServerURL {... url for sql server db ...}
        !define OracleURL {... url for oracle db ...}

        Test suite 1:

        !define URL { ${SQLServerURL} }

        test1
        test2
        test3

        Test suite 2:

        !define URL { ${OracleURL} }

        test1
        test2
        test3

        This would prevent modifying URL for each individual suit.

        Are there other ways/patterns on this issue?








        Yahoo! Groups Links

        <*> To visit your group on the web, go to:

        <*> To unsubscribe from this group, send an email to:

        <*> Your use of Yahoo! Groups is subject to:






      • Meloro, John
        Hey this looks really cool! Is it possible to assign the value of the windows id system variable to an HtmlFixture variable? If so how? Thanks, John M. ...
        Message 3 of 4 , Jun 8, 2005
        View Source
        • 0 Attachment
          Hey this looks really cool!
           
          Is it possible to assign the value of the windows id system variable to an HtmlFixture variable?
           
          If so how?
           
          Thanks,
          John M.
          -----Original Message-----
          From: Micah Martin [mailto:micah@...]
          Sent: Wednesday, June 08, 2005 3:28 PM
          To: fitnesse@yahoogroups.com
          Subject: Re: [fitnesse] Assigning value of one variable to another

          Use parens on the definition...

          !define varnameB ( ${varnameA} )


          Micah Martin

          Object Mentor, Inc.

          www.objectmentor.com



          On Jun 2, 2005, at 2:56 AM, andrei_oleinik wrote:

          Is it possible to assign value of one variable to another?

          The syntax: '!define varnameB { ${varnameA} }' doesn't work.

          The situation is. We have several test suits running against 
          different databases. In fact, tests differ just with database URL, so 
          they are organized as include files using variable 'URL' for DB 
          connection.
          At the moment it looks like this:

          Test suite 1:

          !define URL {...url for sql server db...}

          test1
          test2
          test3

          Test suite 2:

          !define URL {... url for oracle db ...}

          test1
          test2
          test3


          As test suites can be downloaded from central fitnesse server and run 
          against locally installed databases, the value of URL variable needs 
          to be changed for each suite every time.

          The idea is define variables (constants) on the root page, and assign 
          these constants to URL variable in each suit.

          root page:

          !define SQLServerURL {... url for sql server db ...}
          !define OracleURL {... url for oracle db ...}

          Test suite 1:

          !define URL { ${SQLServerURL} }

          test1
          test2
          test3

          Test suite 2:

          !define URL { ${OracleURL} }

          test1
          test2
          test3

          This would prevent modifying URL for each individual suit.

          Are there other ways/patterns on this issue?








          Yahoo! Groups Links

          <*> To visit your group on the web, go to:

          <*> To unsubscribe from this group, send an email to:

          <*> Your use of Yahoo! Groups is subject to:








          ____________________________

          http://www.pragmatics.com

        • andrei_oleinik
          Thank you! It works! Andrei ... URL, so ... run ... needs ... assign
          Message 4 of 4 , Jun 9, 2005
          View Source
          • 0 Attachment
            Thank you! It works!

            Andrei

            --- In fitnesse@yahoogroups.com, Micah Martin <micah@o...> wrote:
            > Use parens on the definition...
            >
            > !define varnameB ( ${varnameA} )
            >
            > Micah Martin
            > Object Mentor, Inc.
            > www.objectmentor.com
            >
            >
            > On Jun 2, 2005, at 2:56 AM, andrei_oleinik wrote:
            >
            > > Is it possible to assign value of one variable to another?
            > >
            > > The syntax: '!define varnameB { ${varnameA} }' doesn't work.
            > >
            > > The situation is. We have several test suits running against
            > > different databases. In fact, tests differ just with database
            URL, so
            > > they are organized as include files using variable 'URL' for DB
            > > connection.
            > > At the moment it looks like this:
            > >
            > > Test suite 1:
            > >
            > > !define URL {...url for sql server db...}
            > >
            > > test1
            > > test2
            > > test3
            > >
            > > Test suite 2:
            > >
            > > !define URL {... url for oracle db ...}
            > >
            > > test1
            > > test2
            > > test3
            > >
            > >
            > > As test suites can be downloaded from central fitnesse server and
            run
            > > against locally installed databases, the value of URL variable
            needs
            > > to be changed for each suite every time.
            > >
            > > The idea is define variables (constants) on the root page, and
            assign
            > > these constants to URL variable in each suit.
            > >
            > > root page:
            > >
            > > !define SQLServerURL {... url for sql server db ...}
            > > !define OracleURL {... url for oracle db ...}
            > >
            > > Test suite 1:
            > >
            > > !define URL { ${SQLServerURL} }
            > >
            > > test1
            > > test2
            > > test3
            > >
            > > Test suite 2:
            > >
            > > !define URL { ${OracleURL} }
            > >
            > > test1
            > > test2
            > > test3
            > >
            > > This would prevent modifying URL for each individual suit.
            > >
            > > Are there other ways/patterns on this issue?
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > >
          Your message has been successfully submitted and would be delivered to recipients shortly.