Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Automated testing...

Automated testing...

Scheduled Pinned Locked Moved The Lounge
databaseai-testingtestingbeta-testingperformance
27 Posts 16 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Jorgen Sigvardsson

    I've been thinking "Ah, that's nice. In theory!" about software unit testing. Until now. :) I've implemented a VBScript scripting host in my app, which allows me to automate input to the app. The app (a POS application) does a series of operations based on the input, and outputs information to database (not counting receipts, and other types of "hard copy" output, which I unfortunately have to test by hand). I predict the output by calculating the output in beforehand in my VBScripts. I then compare the output in the database with my predictions. If there are any deviations from my predictions, I sound the alarm. I've just completed a couple of thousands of tests - a task which would normally have taken me many weeks to do by hand. Admittedly, this is not very fine grained module testing. It's basically seeing the entire app as a black box. But it's better than nothing, and I have already nailed two "once in a blue moon" bugs. Other than that, I think I'm very close to a release. :cool: ps. It's also a great way to stress test your app. After 2000 transactions - no memory leak. Take that, you janitor dependent programmers! :rolleyes: ds.

    -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

    D Offline
    D Offline
    Dan Neely
    wrote on last edited by
    #4

    what you're describing is functional testing, not unit testing. -- Rules of thumb should not be taken for the whole hand.

    E J M 3 Replies Last reply
    0
    • D Dan Neely

      what you're describing is functional testing, not unit testing. -- Rules of thumb should not be taken for the whole hand.

      E Offline
      E Offline
      El Corazon
      wrote on last edited by
      #5

      dan neely wrote:

      what you're describing is functional testing, not unit testing.

      True, but at least he is testing!!! :-D

      _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

      D 1 Reply Last reply
      0
      • J Jorgen Sigvardsson

        I've been thinking "Ah, that's nice. In theory!" about software unit testing. Until now. :) I've implemented a VBScript scripting host in my app, which allows me to automate input to the app. The app (a POS application) does a series of operations based on the input, and outputs information to database (not counting receipts, and other types of "hard copy" output, which I unfortunately have to test by hand). I predict the output by calculating the output in beforehand in my VBScripts. I then compare the output in the database with my predictions. If there are any deviations from my predictions, I sound the alarm. I've just completed a couple of thousands of tests - a task which would normally have taken me many weeks to do by hand. Admittedly, this is not very fine grained module testing. It's basically seeing the entire app as a black box. But it's better than nothing, and I have already nailed two "once in a blue moon" bugs. Other than that, I think I'm very close to a release. :cool: ps. It's also a great way to stress test your app. After 2000 transactions - no memory leak. Take that, you janitor dependent programmers! :rolleyes: ds.

        -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #6

        Joergen Sigvardsson wrote:

        nd other types of "hard copy" output, which I unfortunately have to test by hand

        One of my main apps is a form printing engine, and I wrote some custom test software that involves outputting the forms to PDFs (via a special PDF print driver), and then comparing the PDF against a known good version. Works like a charm and has saved my bacon on more than one occasion.

        J 1 Reply Last reply
        0
        • D David Stone

          Joergen Sigvardsson wrote:

          a POS application

          Aw. Don't be so hard on yourself, Joergen. It can't be that bad. ;P

          And I get on my knees and pray We don't get fooled again

          J Offline
          J Offline
          Jorgen Sigvardsson
          wrote on last edited by
          #7

          :laugh: :laugh:

          -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

          1 Reply Last reply
          0
          • D Dan Neely

            what you're describing is functional testing, not unit testing. -- Rules of thumb should not be taken for the whole hand.

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #8

            So, unit testing doesn't test for correct functionality..? :~ I honestly never understood the difference between functional testing and unit testing, other than that unit testing often means testing very small pieces of code, while functional testing means testing a larger pieces of code.

            -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

            E _ P D 4 Replies Last reply
            0
            • L Lost User

              Joergen Sigvardsson wrote:

              nd other types of "hard copy" output, which I unfortunately have to test by hand

              One of my main apps is a form printing engine, and I wrote some custom test software that involves outputting the forms to PDFs (via a special PDF print driver), and then comparing the PDF against a known good version. Works like a charm and has saved my bacon on more than one occasion.

              J Offline
              J Offline
              Jorgen Sigvardsson
              wrote on last edited by
              #9

              You just gave me an idea! In the debug build, I actually output printouts as bitmaps. Maybe if I stream it to disc... thanks for the idea man! Much appreciated!

              -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

              1 Reply Last reply
              0
              • J Jorgen Sigvardsson

                I've been thinking "Ah, that's nice. In theory!" about software unit testing. Until now. :) I've implemented a VBScript scripting host in my app, which allows me to automate input to the app. The app (a POS application) does a series of operations based on the input, and outputs information to database (not counting receipts, and other types of "hard copy" output, which I unfortunately have to test by hand). I predict the output by calculating the output in beforehand in my VBScripts. I then compare the output in the database with my predictions. If there are any deviations from my predictions, I sound the alarm. I've just completed a couple of thousands of tests - a task which would normally have taken me many weeks to do by hand. Admittedly, this is not very fine grained module testing. It's basically seeing the entire app as a black box. But it's better than nothing, and I have already nailed two "once in a blue moon" bugs. Other than that, I think I'm very close to a release. :cool: ps. It's also a great way to stress test your app. After 2000 transactions - no memory leak. Take that, you janitor dependent programmers! :rolleyes: ds.

                -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

                E Offline
                E Offline
                ednrgc
                wrote on last edited by
                #10

                I really like unit testing. It also covers you from other programmers breaking your code, and blaming it on you. You have proof that you code passed the unit test before they touched it.

                C 1 Reply Last reply
                0
                • J Jorgen Sigvardsson

                  So, unit testing doesn't test for correct functionality..? :~ I honestly never understood the difference between functional testing and unit testing, other than that unit testing often means testing very small pieces of code, while functional testing means testing a larger pieces of code.

                  -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

                  E Offline
                  E Offline
                  El Corazon
                  wrote on last edited by
                  #11

                  Joergen Sigvardsson wrote:

                  I honestly never understood the difference between functional testing and unit testing, other than that unit testing often means testing very small pieces of code, while functional testing means testing a larger pieces of code.

                  well...... close. Functional testing simulates user interaction or external influence, I/O with the outside world. Although you can look at unit testing as the same thing, and some people do. Basically unit testing should test a "unit" a piece of stand-alone code for correctness. Does the compression routine compress, does the decompression routine decompress based on a variety of samples of input data. Does the network class send, does it receive, does it calculate a CRC32, etc. A functional test is similar except it is usually applied to larger class groupings or full applications. If you are simulating mouse clicks, data entry, data transmission/receipt to an entire program to stimulate final-functionality then you are doing a functional test. The problem comes with noun-verb use of function. A functional test refers to the verb use of function, not the noun. Unit tests referse to the noun version of function. Since programmers love analogies: using a car as an example, a functionality test is test-driving a car after building it, a unit test would be making sure a wheel or gear moves, tubes hold heat/pressure to spec and pistons fire at correct timing, etc.

                  _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                  1 Reply Last reply
                  0
                  • J Jorgen Sigvardsson

                    So, unit testing doesn't test for correct functionality..? :~ I honestly never understood the difference between functional testing and unit testing, other than that unit testing often means testing very small pieces of code, while functional testing means testing a larger pieces of code.

                    -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

                    _ Offline
                    _ Offline
                    _Zorro_
                    wrote on last edited by
                    #12

                    Unit testing, if a maner of testing functionalities. (At least it's my concept :p). It is the phylosophy to test a functionality in little portions. So basically it is not the same, but Unit testing is a way to test functionnalities. But if you were not testing func what are you testing?

                    1 Reply Last reply
                    0
                    • J Jorgen Sigvardsson

                      I've been thinking "Ah, that's nice. In theory!" about software unit testing. Until now. :) I've implemented a VBScript scripting host in my app, which allows me to automate input to the app. The app (a POS application) does a series of operations based on the input, and outputs information to database (not counting receipts, and other types of "hard copy" output, which I unfortunately have to test by hand). I predict the output by calculating the output in beforehand in my VBScripts. I then compare the output in the database with my predictions. If there are any deviations from my predictions, I sound the alarm. I've just completed a couple of thousands of tests - a task which would normally have taken me many weeks to do by hand. Admittedly, this is not very fine grained module testing. It's basically seeing the entire app as a black box. But it's better than nothing, and I have already nailed two "once in a blue moon" bugs. Other than that, I think I'm very close to a release. :cool: ps. It's also a great way to stress test your app. After 2000 transactions - no memory leak. Take that, you janitor dependent programmers! :rolleyes: ds.

                      -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

                      M Offline
                      M Offline
                      Mark Salsbery
                      wrote on last edited by
                      #13

                      Joergen Sigvardsson wrote:

                      The app (a POS application)...

                      This is unrelated (as most of my posts are) but around these parts, POS stands for "piece of sh*t" so whenever I see that I have to reread it! :laugh: Cheers! Mark

                      D E 2 Replies Last reply
                      0
                      • M Mark Salsbery

                        Joergen Sigvardsson wrote:

                        The app (a POS application)...

                        This is unrelated (as most of my posts are) but around these parts, POS stands for "piece of sh*t" so whenever I see that I have to reread it! :laugh: Cheers! Mark

                        D Offline
                        D Offline
                        Doctor Nick
                        wrote on last edited by
                        #14

                        Best thing I had was a job I was looking into that included support and deployment of POS systems to end users:laugh: I too had to reread it at first. I was thinking, "Boy, they sure do have a high opinion of their product";P

                        ------------------------------------- Do not do what has already been done. Absolute power corrupts absolutely.. but it ROCKS absolutely, too.

                        1 Reply Last reply
                        0
                        • J Jorgen Sigvardsson

                          So, unit testing doesn't test for correct functionality..? :~ I honestly never understood the difference between functional testing and unit testing, other than that unit testing often means testing very small pieces of code, while functional testing means testing a larger pieces of code.

                          -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

                          P Offline
                          P Offline
                          Pierre Leclercq
                          wrote on last edited by
                          #15

                          <kidding> unit test -> the programmer's tests integration test -> the test guys job :) </kidding> ... Well, of course if this is a project of one...

                          1 Reply Last reply
                          0
                          • E ednrgc

                            I really like unit testing. It also covers you from other programmers breaking your code, and blaming it on you. You have proof that you code passed the unit test before they touched it.

                            C Offline
                            C Offline
                            Chris Austin
                            wrote on last edited by
                            #16

                            ednrgc wrote:

                            You have proof that you code passed the unit test before they touched it.

                            Don't you have your code in a revision controls system? Other dev, or you break the code, roll it back. :)

                            My Blog A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. - -Lazarus Long

                            E 1 Reply Last reply
                            0
                            • C Chris Austin

                              ednrgc wrote:

                              You have proof that you code passed the unit test before they touched it.

                              Don't you have your code in a revision controls system? Other dev, or you break the code, roll it back. :)

                              My Blog A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. - -Lazarus Long

                              E Offline
                              E Offline
                              ednrgc
                              wrote on last edited by
                              #17

                              Sure we do. It's just an added level of protection.

                              1 Reply Last reply
                              0
                              • E El Corazon

                                dan neely wrote:

                                what you're describing is functional testing, not unit testing.

                                True, but at least he is testing!!! :-D

                                _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                                D Offline
                                D Offline
                                Dan Neely
                                wrote on last edited by
                                #18

                                Jeffry J. Brickley wrote:

                                True, but at least he is testing!!!

                                Which is why I ed him, instead ofing. -- Rules of thumb should not be taken for the whole hand.

                                E 1 Reply Last reply
                                0
                                • D Dan Neely

                                  what you're describing is functional testing, not unit testing. -- Rules of thumb should not be taken for the whole hand.

                                  M Offline
                                  M Offline
                                  Marc Clifton
                                  wrote on last edited by
                                  #19

                                  dan neely wrote:

                                  what you're describing is functional testing, not unit testing.

                                  That's an interesting point. When does unit testing cross over into functional testing? Or does it ever? In other words, if I test anything but my lowest level classes and methods, does that mean I'm now doing functional testing? Marc

                                  Thyme In The Country

                                  People are just notoriously impossible. --DavidCrow
                                  There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                                  People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                                  1 Reply Last reply
                                  0
                                  • M Mark Salsbery

                                    Joergen Sigvardsson wrote:

                                    The app (a POS application)...

                                    This is unrelated (as most of my posts are) but around these parts, POS stands for "piece of sh*t" so whenever I see that I have to reread it! :laugh: Cheers! Mark

                                    E Offline
                                    E Offline
                                    El Corazon
                                    wrote on last edited by
                                    #20

                                    Mark Salsbery wrote:

                                    but around these parts, POS stands for "piece of sh*t"

                                    yup, in the business community it refers to Point-Of-Sale, which is a generalized term for capturing information at a remote sale location (gas station for instance, I was in the POS gasoline sales before transferring to Engineering with another company). Ironically, either definition works with POS even in the business community. ;) which was why I jumped ship and went to engineering instead of staying in accounting.

                                    _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                                    M 1 Reply Last reply
                                    0
                                    • D Dan Neely

                                      Jeffry J. Brickley wrote:

                                      True, but at least he is testing!!!

                                      Which is why I ed him, instead ofing. -- Rules of thumb should not be taken for the whole hand.

                                      E Offline
                                      E Offline
                                      El Corazon
                                      wrote on last edited by
                                      #21

                                      dan neely wrote:

                                      Which is why I ed him, instead ofing.

                                      true... but the worst thing about nit picking... is you end up with a handfull of nits.... :rolleyes:

                                      _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                                      1 Reply Last reply
                                      0
                                      • E El Corazon

                                        Mark Salsbery wrote:

                                        but around these parts, POS stands for "piece of sh*t"

                                        yup, in the business community it refers to Point-Of-Sale, which is a generalized term for capturing information at a remote sale location (gas station for instance, I was in the POS gasoline sales before transferring to Engineering with another company). Ironically, either definition works with POS even in the business community. ;) which was why I jumped ship and went to engineering instead of staying in accounting.

                                        _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                                        M Offline
                                        M Offline
                                        Mark Salsbery
                                        wrote on last edited by
                                        #22

                                        Jeffry J. Brickley wrote:

                                        Ironically, either definition works with POS even in the business community.

                                        :laugh:

                                        1 Reply Last reply
                                        0
                                        • J Jorgen Sigvardsson

                                          I've been thinking "Ah, that's nice. In theory!" about software unit testing. Until now. :) I've implemented a VBScript scripting host in my app, which allows me to automate input to the app. The app (a POS application) does a series of operations based on the input, and outputs information to database (not counting receipts, and other types of "hard copy" output, which I unfortunately have to test by hand). I predict the output by calculating the output in beforehand in my VBScripts. I then compare the output in the database with my predictions. If there are any deviations from my predictions, I sound the alarm. I've just completed a couple of thousands of tests - a task which would normally have taken me many weeks to do by hand. Admittedly, this is not very fine grained module testing. It's basically seeing the entire app as a black box. But it's better than nothing, and I have already nailed two "once in a blue moon" bugs. Other than that, I think I'm very close to a release. :cool: ps. It's also a great way to stress test your app. After 2000 transactions - no memory leak. Take that, you janitor dependent programmers! :rolleyes: ds.

                                          -- Verletzen zerfetzen zersetzen zerstören Doch es darf nicht mir gehören Ich muss zerstören

                                          S Offline
                                          S Offline
                                          Stuart Dootson
                                          wrote on last edited by
                                          #23

                                          We've used automated testing for various specific situations (for example, determining the worst case execution times of function - this was with real-time embedded systems, where worst case execution times are important). But this[^] is my favourite automatic testing system (albeit for a non-mainstream language). Define properties you believe should hold true, and they'll be tested automatically.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups