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. Unit Testing Book

Unit Testing Book

Scheduled Pinned Locked Moved The Lounge
csharpwpftestingbeta-testinghelp
14 Posts 10 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.
  • K Offline
    K Offline
    Kevin Marois
    wrote on last edited by
    #1

    Can anyone recommend a good Unit Testing book? I haven't done much Unit Testing. I'm working in C#/WPF. Thanks

    If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

    M P N H V 7 Replies Last reply
    0
    • K Kevin Marois

      Can anyone recommend a good Unit Testing book? I haven't done much Unit Testing. I'm working in C#/WPF. Thanks

      If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

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

      [Test]
      public void UnitTestsArePointless()
      {
      Assert.True();
      }

      Latest Article:
      Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain

      K H K 3 Replies Last reply
      0
      • M Marc Clifton

        [Test]
        public void UnitTestsArePointless()
        {
        Assert.True();
        }

        Latest Article:
        Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain

        K Offline
        K Offline
        Kevin Marois
        wrote on last edited by
        #3

        I agree, but it's being forced on me

        If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

        1 Reply Last reply
        0
        • K Kevin Marois

          Can anyone recommend a good Unit Testing book? I haven't done much Unit Testing. I'm working in C#/WPF. Thanks

          If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

          P Offline
          P Offline
          Peter Adam
          wrote on last edited by
          #4

          From the pen of the author who answered your question first: Unit Testing Succinctly by Marc Clifton[^]

          1 Reply Last reply
          0
          • M Marc Clifton

            [Test]
            public void UnitTestsArePointless()
            {
            Assert.True();
            }

            Latest Article:
            Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain

            H Offline
            H Offline
            haughtonomous
            wrote on last edited by
            #5

            Absolutely not, if properly done.

            1 Reply Last reply
            0
            • K Kevin Marois

              Can anyone recommend a good Unit Testing book? I haven't done much Unit Testing. I'm working in C#/WPF. Thanks

              If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

              N Offline
              N Offline
              NigelBasel
              wrote on last edited by
              #6

              https://www.amazon.com/Art-Unit-Testing-examples/dp/1617290890[^]

              1 Reply Last reply
              0
              • K Kevin Marois

                Can anyone recommend a good Unit Testing book? I haven't done much Unit Testing. I'm working in C#/WPF. Thanks

                If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                H Offline
                H Offline
                haughtonomous
                wrote on last edited by
                #7

                "The Art of Unit Testing" by Roy Osherove. Easy to read, covers the subject comprehensively. I believe the Second Edition covers up to date mocking frameworks.

                1 Reply Last reply
                0
                • K Kevin Marois

                  Can anyone recommend a good Unit Testing book? I haven't done much Unit Testing. I'm working in C#/WPF. Thanks

                  If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                  V Offline
                  V Offline
                  Vaso Elias
                  wrote on last edited by
                  #8

                  This gentleman with great C#/.NET video tips https://www.youtube.com/c/Elfocrash/videos[^] released recently Unit Test training. Check his videos and if you like his teaching, you should find a link to his website with his online trainings.

                  1 Reply Last reply
                  0
                  • K Kevin Marois

                    Can anyone recommend a good Unit Testing book? I haven't done much Unit Testing. I'm working in C#/WPF. Thanks

                    If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                    P Offline
                    P Offline
                    pafabian
                    wrote on last edited by
                    #9

                    TDD = Test Driven Development[^]

                    <>

                    OriginalGriffO 1 Reply Last reply
                    0
                    • P pafabian

                      TDD = Test Driven Development[^]

                      <>

                      OriginalGriffO Offline
                      OriginalGriffO Offline
                      OriginalGriff
                      wrote on last edited by
                      #10

                      Please be careful when inserting links: you distorted this one so badly it looked like "hidden link" spam to the automated system. I let it through and have corrected it, but please try to make sure it doesn't happen again as some of our members are rather more "trigger happy" than I am!

                      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                      1 Reply Last reply
                      0
                      • M Marc Clifton

                        [Test]
                        public void UnitTestsArePointless()
                        {
                        Assert.True();
                        }

                        Latest Article:
                        Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain

                        K Offline
                        K Offline
                        Kate X257
                        wrote on last edited by
                        #11

                        So, for end-to-end testing and feature testing, you know it will make refactoring easier and will protect against regression. But what does a unit test do? I see no immediate benefit, other than bragging rights for high code coverage. What do you think, honestly?

                        OriginalGriffO 1 Reply Last reply
                        0
                        • K Kate X257

                          So, for end-to-end testing and feature testing, you know it will make refactoring easier and will protect against regression. But what does a unit test do? I see no immediate benefit, other than bragging rights for high code coverage. What do you think, honestly?

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #12

                          It allows you to have a framework to test individual components (down to method level) to ensure that they work as intended. And that means when you make a change later, you can run the same tests again and pick up any inadvertent changes you may have made. I used to do this manually: I created tester projects which allowed me to check the "black box" functionality of my class, controls, and so forth so when I used them in real projects I had a high degree of certainty that they worked, and to test my later fixes to make sure I didn't introduce a bug. I started doing this after a colleague fixed "bug A" for a client, who later found "bug B". She fixed that, and the client found "bug A" was back. Fixed ... hello "bug B"! After about 6 loops of this the client was not impressed at all ... formalized testing would have meant that the tests for both bugs would (or at least should) have been done prior to release, and the customer shouldn't have seen a problem. Units tests formalize that, make it a lot easier to regulate, monitor, and perform. Honestly, if you care about code quality I'd recommend you give them a try. Properly done, they can save a lot of grief.

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          K 1 Reply Last reply
                          0
                          • K Kevin Marois

                            Can anyone recommend a good Unit Testing book? I haven't done much Unit Testing. I'm working in C#/WPF. Thanks

                            If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                            M Offline
                            M Offline
                            Michael Schegg
                            wrote on last edited by
                            #13

                            A more funny answer Expert Excuses for Not Writing Unit Tests | Ben E. C. Boyter[^]

                            1 Reply Last reply
                            0
                            • OriginalGriffO OriginalGriff

                              It allows you to have a framework to test individual components (down to method level) to ensure that they work as intended. And that means when you make a change later, you can run the same tests again and pick up any inadvertent changes you may have made. I used to do this manually: I created tester projects which allowed me to check the "black box" functionality of my class, controls, and so forth so when I used them in real projects I had a high degree of certainty that they worked, and to test my later fixes to make sure I didn't introduce a bug. I started doing this after a colleague fixed "bug A" for a client, who later found "bug B". She fixed that, and the client found "bug A" was back. Fixed ... hello "bug B"! After about 6 loops of this the client was not impressed at all ... formalized testing would have meant that the tests for both bugs would (or at least should) have been done prior to release, and the customer shouldn't have seen a problem. Units tests formalize that, make it a lot easier to regulate, monitor, and perform. Honestly, if you care about code quality I'd recommend you give them a try. Properly done, they can save a lot of grief.

                              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                              K Offline
                              K Offline
                              Kate X257
                              wrote on last edited by
                              #14

                              Lines in the sand that multiple people can agree on, and that can be easily checked and evaluated. I can see the value in that. Thanks for the comment. :)

                              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