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. Intellitest - Automated Test Generation.

Intellitest - Automated Test Generation.

Scheduled Pinned Locked Moved The Lounge
csharpvisual-studioai-testing
23 Posts 6 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.
  • S Offline
    S Offline
    shrknt35
    wrote on last edited by
    #1

    Hi all, Thanks in advance.. Has anyone tried Visual Studio's new feature "Intellitest". I was trying it out, and it dose not look mature enough. Please let me know if anyone of you guys have any better insight.

    F L D 3 Replies Last reply
    0
    • S shrknt35

      Hi all, Thanks in advance.. Has anyone tried Visual Studio's new feature "Intellitest". I was trying it out, and it dose not look mature enough. Please let me know if anyone of you guys have any better insight.

      F Offline
      F Offline
      F ES Sitecore
      wrote on last edited by
      #2

      If your tests can be automated then they have no value.

      L N 2 Replies Last reply
      0
      • F F ES Sitecore

        If your tests can be automated then they have no value.

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

        That is a bold statement. One can easily test all DBConnection classes over their interface; input, behaviour and result can be verified, doesn't require a human. The corrected statement here is that you do not see the value yet.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        F 1 Reply Last reply
        0
        • S shrknt35

          Hi all, Thanks in advance.. Has anyone tried Visual Studio's new feature "Intellitest". I was trying it out, and it dose not look mature enough. Please let me know if anyone of you guys have any better insight.

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

          shrknt35 wrote:

          and it dose not look mature enough.

          Please explain; what are you missing, and when would you consider it "mature enough"?

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          S 1 Reply Last reply
          0
          • L Lost User

            That is a bold statement. One can easily test all DBConnection classes over their interface; input, behaviour and result can be verified, doesn't require a human. The corrected statement here is that you do not see the value yet.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            F Offline
            F Offline
            F ES Sitecore
            wrote on last edited by
            #5

            Two issues with that 1) If your database access is done through the likes of EF then all you're doing is testing Microsoft's code, not your own. 2) Testing database activities has no place in unit tests so the whole argument is moot.

            L 1 Reply Last reply
            0
            • F F ES Sitecore

              Two issues with that 1) If your database access is done through the likes of EF then all you're doing is testing Microsoft's code, not your own. 2) Testing database activities has no place in unit tests so the whole argument is moot.

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

              F-ES Sitecore wrote:

              1. If your database access is done through the likes of EF then all you're doing is testing Microsoft's code, not your own.

              Then you are doing it wrong. You don't test whether Microsofts code works, you test whether you get the result you expected.

              F-ES Sitecore wrote:

              1. Testing database activities has no place in unit tests so the whole argument is moot.

              Automated testing should be all in the same place; and yes, one can test the database-activities by code. You rather test by hand? :)

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

              F 1 Reply Last reply
              0
              • F F ES Sitecore

                If your tests can be automated then they have no value.

                N Offline
                N Offline
                Nagy Vilmos
                wrote on last edited by
                #7

                Abso-bloody-lute tosh and drivel! Automated testing is great, even outside TDD environments. I like to have regression tests built-in so that whenever code is checked in, it is automagically built and tested. You know straight away if your new code has negatively impacted the existing code base. Given the right tools, you can even auto-test front ends.

                veni bibi saltavi

                F D 2 Replies Last reply
                0
                • L Lost User

                  F-ES Sitecore wrote:

                  1. If your database access is done through the likes of EF then all you're doing is testing Microsoft's code, not your own.

                  Then you are doing it wrong. You don't test whether Microsofts code works, you test whether you get the result you expected.

                  F-ES Sitecore wrote:

                  1. Testing database activities has no place in unit tests so the whole argument is moot.

                  Automated testing should be all in the same place; and yes, one can test the database-activities by code. You rather test by hand? :)

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                  F Offline
                  F Offline
                  F ES Sitecore
                  wrote on last edited by
                  #8

                  You clearly don't understand unit testing. Making statements like "you do not see the value" and "you are doing it wrong" should really be reserved for when you understand the subject matter. Saying those things doesn't make you right.

                  L 1 Reply Last reply
                  0
                  • N Nagy Vilmos

                    Abso-bloody-lute tosh and drivel! Automated testing is great, even outside TDD environments. I like to have regression tests built-in so that whenever code is checked in, it is automagically built and tested. You know straight away if your new code has negatively impacted the existing code base. Given the right tools, you can even auto-test front ends.

                    veni bibi saltavi

                    F Offline
                    F Offline
                    F ES Sitecore
                    wrote on last edited by
                    #9

                    We're talking about automated generation, not execution. Unit tests by their very nature are executed automatically.

                    D 1 Reply Last reply
                    0
                    • F F ES Sitecore

                      You clearly don't understand unit testing. Making statements like "you do not see the value" and "you are doing it wrong" should really be reserved for when you understand the subject matter. Saying those things doesn't make you right.

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

                      F-ES Sitecore wrote:

                      You clearly don't understand unit testing.

                      Ah, that must be it. Well, that was a short discussion :) For what it is worth; any code can be tested in an automated way. You can choose to, or not to :thumbsup:

                      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                      M 1 Reply Last reply
                      0
                      • L Lost User

                        shrknt35 wrote:

                        and it dose not look mature enough.

                        Please explain; what are you missing, and when would you consider it "mature enough"?

                        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                        S Offline
                        S Offline
                        shrknt35
                        wrote on last edited by
                        #11

                        Eddy Vluggen wrote:

                        when would you consider it "mature enough"?

                        Simple : When I run intellitest, it runs well enough, create lots of test cases, but when I save them, it confuses some of classes with same name as some .net classes and do not even provide a way for me fix it : thus not mature enough. Now, I know I probably should avoid such names, but it's a legacy code.

                        L 1 Reply Last reply
                        0
                        • L Lost User

                          F-ES Sitecore wrote:

                          You clearly don't understand unit testing.

                          Ah, that must be it. Well, that was a short discussion :) For what it is worth; any code can be tested in an automated way. You can choose to, or not to :thumbsup:

                          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                          M Offline
                          M Offline
                          Manfred Rudolf Bihy
                          wrote on last edited by
                          #12

                          Don't feed the @+O== ! :laugh:

                          "I had the right to remain silent, but I didn't have the ability!"

                          Ron White, Comedian

                          1 Reply Last reply
                          0
                          • S shrknt35

                            Eddy Vluggen wrote:

                            when would you consider it "mature enough"?

                            Simple : When I run intellitest, it runs well enough, create lots of test cases, but when I save them, it confuses some of classes with same name as some .net classes and do not even provide a way for me fix it : thus not mature enough. Now, I know I probably should avoid such names, but it's a legacy code.

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

                            Add the namespace; it would no longer be confused. I don't think MS will consider that a problem; no software works if it cannot determine which class to use. Meaning, it will probably not mature on that specific area.

                            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                            1 Reply Last reply
                            0
                            • S shrknt35

                              Hi all, Thanks in advance.. Has anyone tried Visual Studio's new feature "Intellitest". I was trying it out, and it dose not look mature enough. Please let me know if anyone of you guys have any better insight.

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

                              I played around with it over xmas/newyears break last year, it seemed like it might be useful with greenfield development to help make sure you're covering all the bases. It was nowhere near ready to meet its hyped ability to generate a regression test suite for legacy code. Major limitations I found were: 0) Ignored all methods in a winform class that touched a UI element. IOW if your legacy app has significant logic in OnClick() events you're still elephanted when it comes to testing. 1) If you've got any static/global state it can't figure out how to initialize it (or even that it needs to). Again, meaning you're probably elephanted with a legacy app. 2) Total faceplant for anything touching the file system that relies on function input. It's automated parameter generation to try and find a working path will pass "a", "b", "c", etc to File.Open() etc until it gives up after a jillion futile attempts. Your legacy app that didn't abstract the file system away, yeah you're elephanted again. The app I played with didn't do any DB access; but based on what I saw I'd be shocked if it didn't try connection strings of "a", etc until it gave up; again being elephanting useless. Didn't test WPF either; but to the extent that you didn't drink the data binding koolaid and make a thin brainless UI class you're presumably elephanted again. The Beta UI also made getting the test cases it generated into unit test files rather klunky. If you were using it to verify your test coverage as you went it wouldn't be too bad; but it'd make trying to get a full test suite in place a PITA even if you had an easily testable codebase.

                              Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                              F S 2 Replies Last reply
                              0
                              • F F ES Sitecore

                                We're talking about automated generation, not execution. Unit tests by their very nature are executed automatically.

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

                                For legacy apps I'd love to be able to click an easy button and generate a full regression test suite before starting to elephant with stuff.

                                Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                                F N 2 Replies Last reply
                                0
                                • N Nagy Vilmos

                                  Abso-bloody-lute tosh and drivel! Automated testing is great, even outside TDD environments. I like to have regression tests built-in so that whenever code is checked in, it is automagically built and tested. You know straight away if your new code has negatively impacted the existing code base. Given the right tools, you can even auto-test front ends.

                                  veni bibi saltavi

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

                                  I don't suppose you know anything decent for WinForm UI testing? By decent, I mean something that I can click and type on the UI to generate the initial script (elephant you TestStack.White) and stable enough that I don't spend half my time reinstalling it because it suddenly stopped working (elephant you too irRatonal dysFunctional Tester of patience).

                                  Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                                  1 Reply Last reply
                                  0
                                  • D Dan Neely

                                    For legacy apps I'd love to be able to click an easy button and generate a full regression test suite before starting to elephant with stuff.

                                    Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                                    F Offline
                                    F Offline
                                    F ES Sitecore
                                    wrote on last edited by
                                    #17

                                    Then all you're testing is that the code you have does what it currently does....but you know it does, that's a tautology.

                                    public int Add(int x, int y)
                                    {
                                    return x + x;
                                    }

                                    The above code has a typo, it should be x + y, but my auto-generated tests are going to test;

                                    public void TestAdd()
                                    {
                                    int addResult = Instance.Add(5, 8);
                                    Assert.AreEqual(10, addResult);
                                    }

                                    I see no value in this at all, it takes a human being who understands the *intent* of the code to write valid tests.

                                    D 1 Reply Last reply
                                    0
                                    • D Dan Neely

                                      For legacy apps I'd love to be able to click an easy button and generate a full regression test suite before starting to elephant with stuff.

                                      Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                                      N Offline
                                      N Offline
                                      Nagy Vilmos
                                      wrote on last edited by
                                      #18

                                      #cough#[^]

                                      veni bibi saltavi

                                      1 Reply Last reply
                                      0
                                      • D Dan Neely

                                        I played around with it over xmas/newyears break last year, it seemed like it might be useful with greenfield development to help make sure you're covering all the bases. It was nowhere near ready to meet its hyped ability to generate a regression test suite for legacy code. Major limitations I found were: 0) Ignored all methods in a winform class that touched a UI element. IOW if your legacy app has significant logic in OnClick() events you're still elephanted when it comes to testing. 1) If you've got any static/global state it can't figure out how to initialize it (or even that it needs to). Again, meaning you're probably elephanted with a legacy app. 2) Total faceplant for anything touching the file system that relies on function input. It's automated parameter generation to try and find a working path will pass "a", "b", "c", etc to File.Open() etc until it gives up after a jillion futile attempts. Your legacy app that didn't abstract the file system away, yeah you're elephanted again. The app I played with didn't do any DB access; but based on what I saw I'd be shocked if it didn't try connection strings of "a", etc until it gave up; again being elephanting useless. Didn't test WPF either; but to the extent that you didn't drink the data binding koolaid and make a thin brainless UI class you're presumably elephanted again. The Beta UI also made getting the test cases it generated into unit test files rather klunky. If you were using it to verify your test coverage as you went it wouldn't be too bad; but it'd make trying to get a full test suite in place a PITA even if you had an easily testable codebase.

                                        Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                                        F Offline
                                        F Offline
                                        F ES Sitecore
                                        wrote on last edited by
                                        #19

                                        None of those are issues. Your unit tests shouldn't touch UI (winforms UI is inherently non unit testable, as is the session\cookies\etc\etc in a website), or the filesystem, or database connections. Unit tests are *not* integration tests, end-to-end tests, UI tests or anything else...they are for unit testing small functions of code, and not all code is unit testable. If your code is behind a click event it is untestable, if it references a textbox it is untestable, if it touches *any* resource not in its immediate environment such as file system\database\asp session\etc it is untestable. If you want your code unit-testable it normally takes a large amount of time and effort and specific architectural patterns such as abstracting away file systems etc, for it to be achieved. The reason the tool is ignoring your code is actually correct...that code can't be unit tested.

                                        D 1 Reply Last reply
                                        0
                                        • D Dan Neely

                                          I played around with it over xmas/newyears break last year, it seemed like it might be useful with greenfield development to help make sure you're covering all the bases. It was nowhere near ready to meet its hyped ability to generate a regression test suite for legacy code. Major limitations I found were: 0) Ignored all methods in a winform class that touched a UI element. IOW if your legacy app has significant logic in OnClick() events you're still elephanted when it comes to testing. 1) If you've got any static/global state it can't figure out how to initialize it (or even that it needs to). Again, meaning you're probably elephanted with a legacy app. 2) Total faceplant for anything touching the file system that relies on function input. It's automated parameter generation to try and find a working path will pass "a", "b", "c", etc to File.Open() etc until it gives up after a jillion futile attempts. Your legacy app that didn't abstract the file system away, yeah you're elephanted again. The app I played with didn't do any DB access; but based on what I saw I'd be shocked if it didn't try connection strings of "a", etc until it gave up; again being elephanting useless. Didn't test WPF either; but to the extent that you didn't drink the data binding koolaid and make a thin brainless UI class you're presumably elephanted again. The Beta UI also made getting the test cases it generated into unit test files rather klunky. If you were using it to verify your test coverage as you went it wouldn't be too bad; but it'd make trying to get a full test suite in place a PITA even if you had an easily testable codebase.

                                          Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                                          S Offline
                                          S Offline
                                          shrknt35
                                          wrote on last edited by
                                          #20

                                          Thanks man that's really helpful.

                                          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