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

BDD for Database testing

Expand Messages
  • abhishek singh
    We are trying to adopt BDD (behaviour driven development - basically TDD with  custom  Domain Specific language. the domain here being the DB testing) in our
    Message 1 of 6 , Feb 6, 2010
    • 0 Attachment
      We are trying to adopt BDD (behaviour driven development - basically TDD with  custom  Domain Specific language. the domain here being the DB testing) in our Team. We have a BDD for testing web based applications, wherein our DSL has grammar like
      Given page http://somepage.com/default.aspx
      when I  type 'userName' in textbox 'txtUser'
      click on button 'btnLogin'
      Verify lable 'lblName' contains 'user name'
       
      so Business users can write a test in above language/syntax which we can execute against our code.
       
      same thing we are trying to adopt for Database testing. so that
      a) business uesrs who technically don't understand DB queries can write test in English like text
      b) Our test should not be code oriented(sql scripts), but they will be English like text which is easier to understand and read.
       
      Most of our DB test scenarios are like
      a)  do some operation from UI - then go to db and verify it actually updated the DB. So its more of a DB value comparison before and after User operation.
       
      We are totally confused on what a language for this should look like. Can you please guide to some resources/links/articles which can help us to adopt BDD for Database testing.
       


      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

      [Non-text portions of this message have been removed]
    • Pramod Sadalage
      Abjishek, may be this would help http://www.methodsandtools.com/archive/archive.php?id=78 Pramod ... -- Pramod Sadalage www.sadalage.com
      Message 2 of 6 , Feb 6, 2010
      • 0 Attachment
        Abjishek,

        may be this would help

        http://www.methodsandtools.com/archive/archive.php?id=78

        Pramod

        On Sat, Feb 6, 2010 at 5:56 AM, abhishek singh <singhhome@...> wrote:

        >
        >
        >
        > We are trying to adopt BDD (behaviour driven development - basically TDD
        > with custom Domain Specific language. the domain here being the DB
        > testing) in our Team. We have a BDD for testing web based applications,
        > wherein our DSL has grammar like
        > Given page http://somepage.com/default.aspx
        > when I type 'userName' in textbox 'txtUser'
        > click on button 'btnLogin'
        > Verify lable 'lblName' contains 'user name'
        >
        > so Business users can write a test in above language/syntax which we can
        > execute against our code.
        >
        > same thing we are trying to adopt for Database testing. so that
        > a) business uesrs who technically don't understand DB queries can write
        > test in English like text
        > b) Our test should not be code oriented(sql scripts), but they will be
        > English like text which is easier to understand and read.
        >
        > Most of our DB test scenarios are like
        > a) do some operation from UI - then go to db and verify it actually
        > updated the DB. So its more of a DB value comparison before and after User
        > operation.
        >
        > We are totally confused on what a language for this should look like. Can
        > you please guide to some resources/links/articles which can help us to adopt
        > BDD for Database testing.
        >
        >
        > The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
        > http://in.yahoo.com/
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >



        --
        Pramod Sadalage
        www.sadalage.com
        www.databaserefactoring.com
        www.twitter.com/pramodsadalage


        [Non-text portions of this message have been removed]
      • Max Guernsey, III
        If you are trying to specify things in terms that business users can understand, you might start by asking them what they want to happen with a given story.
        Message 3 of 6 , Feb 6, 2010
        • 0 Attachment
          If you are trying to specify things in terms that business users can
          understand, you might start by asking them what they want to happen with a
          given story. Try to capture a test in their words, then break it down into
          something that you, they, and the computer can all understand.

          So, if they expect some data to be captured after a user action, ask them
          what they expect to have been done before the scenario and write that down.
          Then ask them what they expect the user to do and write that down. Finally,
          ask them what they expect the system's response to be and write that down.

          Example:

          You: What do you expect to have been done before this scenario begins?
          Them: Nothing.
          You: Nothing? They don't need to have logged in or navigated to a web
          page.
          Them: Oh. Right. Okay. They've logged into the website and navigated to
          the place where they change their user profile.
          (You repeat what you heard as you write it down)
          You: Given that the user "Tommy" has logged in and navigated to the Edit
          User Profile Page... that about right?
          Them: Right.
          You: Then what should they do to make this story happen?
          Them: Well... I guess they would enter their new nickname.
          You: Just enter it or enter it and press save?
          Them: Yeah... they have to press save.
          (You repeat what you heard as you write it down)
          You: When the user enters the new nickname 'Joe' and clicks Save... that
          about right?
          Them: Sounds good.
          You: What should happen?
          Them: Well... I mean... isn't it obvious?
          You: Maybe; I want to hear it in your words.
          Them: Then the user's new nickname should be 'Joe.'
          (You repeat what you heard as you write it down)
          You: Then the user "Tommy's" new nickname should be "Joe." Right?
          Them: Yep.

          Now look at what you have written down:
          Given that the user "Tommy" has logged in and navigated to the Edit User
          Profile Page; when the user enters the Nickname "Joe" and clicks Save, then
          the user's new nickname should be "Joe."

          Then you need to digest this into something that is machine executable,
          non-ambiguous, and still non-technical-human-readable. If you were using
          Concordion, you might mark up the "fields" in that scenario and wire
          everything to a class that loosely correlates to the intent of the document
          - a Concordion expert could probably elaborate or correct what I just said
          there.

          If you are using FIT, you will need to massage the text into something a
          little easier to consume for FIT:
          Given that the user "Tommy" has logged in

          And navigated to the Edit User Profile Page

          When the user enters the Nickname "Joe" and clicks Save

          Then the user's new nickname should be "Joe"

          Then you break that into tables:

          |Given|that the user|"Tommy"|has logged in|

          |And|navigated to the|Edit User Profile|page|

          |When|the user enters|the Nickname|"Joe"|
          |and |clicks |Save |

          |Then|the user's new|Nickname|should be|"Joe"|

          Anyway... that's just an example. There are techniques to emerge a language
          but, like the languages themselves, they have to emerge rather than be told.

          I guess the answer is "whatever works for you." :)

          -- Max

          -----Original Message-----
          From: agileDatabases@yahoogroups.com [mailto:agileDatabases@yahoogroups.com]
          On Behalf Of Pramod Sadalage
          Sent: Saturday, February 06, 2010 2:30 PM
          To: agileDatabases@yahoogroups.com
          Subject: Re: [agileDatabases] BDD for Database testing

          Abjishek,

          may be this would help

          http://www.methodsandtools.com/archive/archive.php?id=78

          Pramod

          On Sat, Feb 6, 2010 at 5:56 AM, abhishek singh <singhhome@...> wrote:

          >
          >
          >
          > We are trying to adopt BDD (behaviour driven development - basically TDD
          > with custom Domain Specific language. the domain here being the DB
          > testing) in our Team. We have a BDD for testing web based applications,
          > wherein our DSL has grammar like
          > Given page http://somepage.com/default.aspx
          > when I type 'userName' in textbox 'txtUser'
          > click on button 'btnLogin'
          > Verify lable 'lblName' contains 'user name'
          >
          > so Business users can write a test in above language/syntax which we can
          > execute against our code.
          >
          > same thing we are trying to adopt for Database testing. so that
          > a) business uesrs who technically don't understand DB queries can write
          > test in English like text
          > b) Our test should not be code oriented(sql scripts), but they will be
          > English like text which is easier to understand and read.
          >
          > Most of our DB test scenarios are like
          > a) do some operation from UI - then go to db and verify it actually
          > updated the DB. So its more of a DB value comparison before and after User
          > operation.
          >
          > We are totally confused on what a language for this should look like. Can
          > you please guide to some resources/links/articles which can help us to
          adopt
          > BDD for Database testing.
          >
          >
          > The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
          > http://in.yahoo.com/
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >



          --
          Pramod Sadalage
          www.sadalage.com
          www.databaserefactoring.com
          www.twitter.com/pramodsadalage


          [Non-text portions of this message have been removed]



          ------------------------------------

          Yahoo! Groups Links



          No virus found in this incoming message.
          Checked by AVG - www.avg.com
          Version: 8.5.435 / Virus Database: 271.1.1/2671 - Release Date: 02/06/10
          07:35:00
        • lawrence_a_99
          Have you considered the FitNesse framework and the DbFit
          Message 4 of 6 , Feb 8, 2010
          • 0 Attachment
            Have you considered the FitNesse
            <http://www.fitnesse.org/FitNesse.FitNesse> framework
            <www.fitnesse.org%20> and the DbFit <http://fitnesse.info/dbfit>
            fictures that are designed specifically for enabling tests to execute
            directly against a database.

            We've been using dbFit with some success for database (in fact Data
            Warehouse) development with some success and could definitley recommend
            it.

            Andy


            --- In agileDatabases@yahoogroups.com, abhishek singh <singhhome@...>
            wrote:
            >
            >
            > We are trying to adopt BDD (behaviour driven development - basically
            TDD with custom Domain Specific language. the domain here being the DB
            testing) in our Team. We have a BDD for testing web based applications,
            wherein our DSL has grammar like
            > Given page http://somepage.com/default.aspx
            > when I type 'userName' in textbox 'txtUser'
            > click on button 'btnLogin'
            > Verify lable 'lblName' contains 'user name'
            >
            > so Business users can write a test in above language/syntax which we
            can execute against our code.
            >
            > same thing we are trying to adopt for Database testing. so that
            > a) business uesrs who technically don't understand DB queries can
            write test in English like text
            > b) Our test should not be code oriented(sql scripts), but they will be
            English like text which is easier to understand and read.
            >
            > Most of our DB test scenarios are like
            > a) do some operation from UI - then go to db and verify it actually
            updated the DB. So its more of a DB value comparison before and after
            User operation.
            >
            > We are totally confused on what a language for this should look like.
            Can you please guide to some resources/links/articles which can help us
            to adopt BDD for Database testing.
            >
            >
            >
            > The INTERNET now has a personality. YOURS! See your Yahoo!
            Homepage. http://in.yahoo.com/
            >
            > [Non-text portions of this message have been removed]
            >



            [Non-text portions of this message have been removed]
          • acchecco
            We use both FitNesse and DbFit in our organization for component and database testing. I would recommend that you look into a combination of the two: FitNesse
            Message 5 of 6 , Feb 9, 2010
            • 0 Attachment
              We use both FitNesse and DbFit in our organization for component and database testing. I would recommend that you look into a combination of the two: FitNesse for testing the input and DbFit to look at the database afterwards.

              --- In agileDatabases@yahoogroups.com, "lawrence_a_99" <andy.lawrence@...> wrote:
              >
              > Have you considered the FitNesse
              > <http://www.fitnesse.org/FitNesse.FitNesse> framework
              > <www.fitnesse.org%20> and the DbFit <http://fitnesse.info/dbfit>
              > fictures that are designed specifically for enabling tests to execute
              > directly against a database.
              >
              > We've been using dbFit with some success for database (in fact Data
              > Warehouse) development with some success and could definitley recommend
              > it.
              >
              > Andy
              >
              >
              > --- In agileDatabases@yahoogroups.com, abhishek singh <singhhome@>
              > wrote:
              > >
              > >
              > > We are trying to adopt BDD (behaviour driven development - basically
              > TDD with custom Domain Specific language. the domain here being the DB
              > testing) in our Team. We have a BDD for testing web based applications,
              > wherein our DSL has grammar like
              > > Given page http://somepage.com/default.aspx
              > > when I type 'userName' in textbox 'txtUser'
              > > click on button 'btnLogin'
              > > Verify lable 'lblName' contains 'user name'
              > >
              > > so Business users can write a test in above language/syntax which we
              > can execute against our code.
              > >
              > > same thing we are trying to adopt for Database testing. so that
              > > a) business uesrs who technically don't understand DB queries can
              > write test in English like text
              > > b) Our test should not be code oriented(sql scripts), but they will be
              > English like text which is easier to understand and read.
              > >
              > > Most of our DB test scenarios are like
              > > a) do some operation from UI - then go to db and verify it actually
              > updated the DB. So its more of a DB value comparison before and after
              > User operation.
              > >
              > > We are totally confused on what a language for this should look like.
              > Can you please guide to some resources/links/articles which can help us
              > to adopt BDD for Database testing.
              > >
              > >
              > >
              > > The INTERNET now has a personality. YOURS! See your Yahoo!
              > Homepage. http://in.yahoo.com/
              > >
              > > [Non-text portions of this message have been removed]
              > >
              >
              >
              >
              > [Non-text portions of this message have been removed]
              >
            • Tim Andersen
              +1 for FitNesse, FitLibrary, and DbFit I think this is a horrible example of BDD. ... My understanding of BDD is the language we use affects the way we
              Message 6 of 6 , Feb 9, 2010
              • 0 Attachment
                +1 for FitNesse, FitLibrary, and DbFit

                I think this is a horrible example of BDD.
                > > Given page http://somepage.com/default.aspx
                > > when I type 'userName' in textbox 'txtUser'
                > > click on button 'btnLogin'
                > > Verify lable 'lblName' contains 'user name'

                My understanding of BDD is 'the language we use affects the way we think'.
                The example above doesn't communicate any extra meaning or context with the
                words in between. It is too GUI focused. It might be different if it was a
                security application, but I'm guessing that this is just one of the first
                features.

                We use FiNesse with personas, to provide context for our tests. Here's an
                example: http://twitpic.com/f6tmx

                We have found it necessary to expose some of the underlying implementation
                details for our database tests using DbFit. This might be because our
                business users are very familiar with the database. Most of what we are
                testing with DbFit is stored procedures and triggers. Also, we have
                found that using personas in database tests (or batch processing tests) does
                not make much sense.

                Tim Andersen



                On Tue, Feb 9, 2010 at 9:17 PM, acchecco <acchecco@...> wrote:

                >
                >
                > We use both FitNesse and DbFit in our organization for component and
                > database testing. I would recommend that you look into a combination of the
                > two: FitNesse for testing the input and DbFit to look at the database
                > afterwards.
                >
                > --- In agileDatabases@yahoogroups.com <agileDatabases%40yahoogroups.com>,
                > "lawrence_a_99" <andy.lawrence@...> wrote:
                > >
                > > Have you considered the FitNesse
                > > <http://www.fitnesse.org/FitNesse.FitNesse> framework
                > > <www.fitnesse.org%20> and the DbFit <http://fitnesse.info/dbfit>
                > > fictures that are designed specifically for enabling tests to execute
                > > directly against a database.
                > >
                > > We've been using dbFit with some success for database (in fact Data
                > > Warehouse) development with some success and could definitley recommend
                > > it.
                > >
                > > Andy
                > >
                > >
                > > --- In agileDatabases@yahoogroups.com <agileDatabases%40yahoogroups.com>,
                > abhishek singh <singhhome@>
                > > wrote:
                > > >
                > > >
                > > > We are trying to adopt BDD (behaviour driven development - basically
                > > TDD with custom Domain Specific language. the domain here being the DB
                > > testing) in our Team. We have a BDD for testing web based applications,
                > > wherein our DSL has grammar like
                > > > Given page http://somepage.com/default.aspx
                > > > when I type 'userName' in textbox 'txtUser'
                > > > click on button 'btnLogin'
                > > > Verify lable 'lblName' contains 'user name'
                > > >
                > > > so Business users can write a test in above language/syntax which we
                > > can execute against our code.
                > > >
                > > > same thing we are trying to adopt for Database testing. so that
                > > > a) business uesrs who technically don't understand DB queries can
                > > write test in English like text
                > > > b) Our test should not be code oriented(sql scripts), but they will be
                > > English like text which is easier to understand and read.
                > > >
                > > > Most of our DB test scenarios are like
                > > > a) do some operation from UI - then go to db and verify it actually
                > > updated the DB. So its more of a DB value comparison before and after
                > > User operation.
                > > >
                > > > We are totally confused on what a language for this should look like.
                > > Can you please guide to some resources/links/articles which can help us
                > > to adopt BDD for Database testing.
                > > >
                > > >
                > > >
                > > > The INTERNET now has a personality. YOURS! See your Yahoo!
                > > Homepage. http://in.yahoo.com/
                > > >
                > > > [Non-text portions of this message have been removed]
                > > >
                > >
                > >
                > >
                > > [Non-text portions of this message have been removed]
                > >
                >
                >
                >


                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.