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

Getting the test name from the fixture

Expand Messages
  • bertrand.hameau
    Hello everyone, I would like to get the test name (i.e. the web page s title) in a fixture (DoFixture) at runtime. My goal is to print out the test name in the
    Message 1 of 5 , Jun 2, 2008
    • 0 Attachment
      Hello everyone,

      I would like to get the test name (i.e. the web page's title) in a
      fixture (DoFixture) at runtime.

      My goal is to print out the test name in the log from the fixture.
      For example this could be a way to easily find the logs corresponding
      to a test with errors
      (ctrl+f with the test name in the log output).

      Thank you,

      Bertrand.
    • Dassing, Andrew
      The FitNesse beta source code at SourceForge provides PAGE_NAME and PAGE_PATH variables accessible via ${PAGE_NAME} and ${PAGE_PATH}. Stay Fit, Andy
      Message 2 of 5 , Jun 2, 2008
      • 0 Attachment
        The FitNesse beta source code at SourceForge provides PAGE_NAME and PAGE_PATH variables accessible via ${PAGE_NAME} and ${PAGE_PATH}.
         
        Stay Fit,
        Andy


        From: fitnesse@yahoogroups.com [mailto:fitnesse@yahoogroups.com] On Behalf Of bertrand.hameau
        Sent: Monday, June 02, 2008 9:51 AM
        To: fitnesse@yahoogroups.com
        Subject: [fitnesse] Getting the test name from the fixture

        Hello everyone,

        I would like to get the test name (i.e. the web page's title) in a
        fixture (DoFixture) at runtime.

        My goal is to print out the test name in the log from the fixture.
        For example this could be a way to easily find the logs corresponding
        to a test with errors
        (ctrl+f with the test name in the log output).

        Thank you,

        Bertrand.

      • Antoine Contal
        That is interesting. How can a fixture ask the FitNesse framework to evaluate the value of a variable? Is there something like Fitnesse.evaluate( PAGE_NAME )
        Message 3 of 5 , Jun 3, 2008
        • 0 Attachment
          That is interesting. How can a fixture ask the FitNesse framework to
          evaluate the value of a variable? Is there something like
          Fitnesse.evaluate("PAGE_NAME") that can be called from any fixture?

          antoine

          On Mon, Jun 2, 2008 at 4:38 PM, Dassing, Andrew
          <andrew.dassing@...> wrote:
          > The FitNesse beta source code at SourceForge provides PAGE_NAME and
          > PAGE_PATH variables accessible via ${PAGE_NAME} and ${PAGE_PATH}.
          >
          > Stay Fit,
          > Andy
          > ________________________________
          > From: fitnesse@yahoogroups.com [mailto:fitnesse@yahoogroups.com] On Behalf
          > Of bertrand.hameau
          > Sent: Monday, June 02, 2008 9:51 AM
          > To: fitnesse@yahoogroups.com
          > Subject: [fitnesse] Getting the test name from the fixture
          >
          > Hello everyone,
          >
          > I would like to get the test name (i.e. the web page's title) in a
          > fixture (DoFixture) at runtime.
          >
          > My goal is to print out the test name in the log from the fixture.
          > For example this could be a way to easily find the logs corresponding
          > to a test with errors
          > (ctrl+f with the test name in the log output).
          >
          > Thank you,
          >
          > Bertrand.
        • Dassing, Andrew
          Simply pass ${PAGE_NAME} as a fixture argument, column/row value, or flow mode (e.g., DoFixture) method argument. ... #-- Any Fixture Argument # !| My Special
          Message 4 of 5 , Jun 3, 2008
          • 0 Attachment
            Simply pass ${PAGE_NAME} as a fixture argument, column/row value, or flow mode (e.g., DoFixture) method argument.
             
            Three Examples:
            -----------------------------------------------WIKI #1
            #-- Any Fixture Argument
            #
            !| My Special Column Fixture       | ${PAGE_NAME} |
            | arg one | arg two | sum result   |
            | 1       | 3       | 4            |
            | 2       | 3       | 5            |
            | 3       | 3       | 6            |
            | 4       | 3       | 7            |
             
            -----------------------------------------------WIKI #2
            #-- Column Fixture Values
            #
            !| My Special Column Fixture                    |
            | page         | arg one | arg two | sum result |
            | ${PAGE_NAME} | 1       | 3       | 4          |
            | ${PAGE_NAME} | 2       | 3       | 5          |
            | ${PAGE_NAME} | 3       | 3       | 6          |
            | ${PAGE_NAME} | 4       | 3       | 7          |
             
            -----------------------------------------------WIKI #3
            #-- Flow Mode Method Argument
            #
            !| My Special Do Fixture |
             
            !| set page name | ${PAGE_NAME} |
             
            !| sum two numbers | 1 | plus | 2 | equals | 3 |
             
            !| returns column fixture        |
            | arg one | arg two | sum result |
            | 1       | 3       | 4          |
            | 2       | 3       | 5          |
            | 3       | 3       | 6          |
             
            !| flush log for | ${PAGE_NAME} |
             
            Stay Fit,
            Andy
             

            From: fitnesse@yahoogroups.com [mailto:fitnesse@yahoogroups.com] On Behalf Of Antoine Contal
            Sent: Tuesday, June 03, 2008 7:05 AM
            To: fitnesse@yahoogroups.com
            Subject: Re: [fitnesse] Getting the test name from the fixture

            That is interesting. How can a fixture ask the FitNesse framework to
            evaluate the value of a variable? Is there something like
            Fitnesse.evaluate( "PAGE_NAME" ) that can be called from any fixture?

            antoine

            On Mon, Jun 2, 2008 at 4:38 PM, Dassing, Andrew
            <andrew.dassing@ nielsen.com> wrote:

            > The FitNesse beta source code at SourceForge provides PAGE_NAME
            and
            > PAGE_PATH variables accessible via ${PAGE_NAME} and
            ${PAGE_PATH} .
            >
            > Stay Fit,
            > Andy
            >
            ____________ _________ _________ __
            > From:
            href="mailto:fitnesse%40yahoogroups.com">fitnesse@yahoogroup s.com [mailto:fitnesse@yahoogroup s.com] On Behalf
            > Of bertrand.hameau
            > Sent: Monday, June 02, 2008 9:51
            AM
            > To:
            href="mailto:fitnesse%40yahoogroups.com">fitnesse@yahoogroup s.com
            >
            Subject: [fitnesse] Getting the test name from the fixture
            >
            > Hello
            everyone,
            >
            > I would like to get the test name (i.e. the web page's
            title) in a
            > fixture (DoFixture) at runtime.
            >
            > My goal is
            to print out the test name in the log from the fixture.
            > For example this
            could be a way to easily find the logs corresponding
            > to a test with
            errors
            > (ctrl+f with the test name in the log output).
            >
            >
            Thank you,
            >
            > Bertrand.

          • John Roth
            ... From: Antoine Contal To: Sent: Tuesday, June 03, 2008 5:04 AM Subject: Re: [fitnesse] Getting the
            Message 5 of 5 , Jun 3, 2008
            • 0 Attachment
              ----- Original Message -----
              From: "Antoine Contal" <antoine.contal@...>
              To: <fitnesse@yahoogroups.com>
              Sent: Tuesday, June 03, 2008 5:04 AM
              Subject: Re: [fitnesse] Getting the test name from the fixture


              > That is interesting. How can a fixture ask the FitNesse framework to
              > evaluate the value of a variable? Is there something like
              > Fitnesse.evaluate("PAGE_NAME") that can be called from any fixture?
              >
              > antoine

              It can't. You have to plug those variables into a table in the page and then
              have a fixture which extracts them and either stores them or does something
              with them.

              That's one reason why Python FIT is moving in the direction of putting
              all the environmental stuff in the symbol table so it's always accessable.

              John Roth
              Python FIT


              >
              > On Mon, Jun 2, 2008 at 4:38 PM, Dassing, Andrew
              > <andrew.dassing@...> wrote:
              >> The FitNesse beta source code at SourceForge provides PAGE_NAME and
              >> PAGE_PATH variables accessible via ${PAGE_NAME} and ${PAGE_PATH}.
              >>
              >> Stay Fit,
              >> Andy
              >> ________________________________
              >> From: fitnesse@yahoogroups.com [mailto:fitnesse@yahoogroups.com] On
              >> Behalf
              >> Of bertrand.hameau
              >> Sent: Monday, June 02, 2008 9:51 AM
              >> To: fitnesse@yahoogroups.com
              >> Subject: [fitnesse] Getting the test name from the fixture
              >>
              >> Hello everyone,
              >>
              >> I would like to get the test name (i.e. the web page's title) in a
              >> fixture (DoFixture) at runtime.
              >>
              >> My goal is to print out the test name in the log from the fixture.
              >> For example this could be a way to easily find the logs corresponding
              >> to a test with errors
              >> (ctrl+f with the test name in the log output).
              >>
              >> Thank you,
              >>
              >> Bertrand.
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.