Announcement

Collapse
No announcement yet.

MSTest / Visual Studio Integrated Testing is absolutely terrible

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MSTest / Visual Studio Integrated Testing is absolutely terrible

    I cannot stress this enough. STAY FAR AWAY FROM MSTest or the integrated Visual Studio testing.

    I spent the past day and a half troubleshooting a vast array of perplexing, retarded issues with them. The documentation would have you believe MSTest and Visual Studio are equivalent, one is the command line implementation of the other...but that's not correct. If we run all tests in our solution file they all pass. If we run them via MSTest, 10 out of 44 fail. The error message tells you that it couldn't find a file, a file that is obviously there if you look in the output directories

    At this point you discover that MS test creates its own brand new output directory for every single test run. And it only copies the files in there that are explicitly referenced in your test file. It doesn't matter if you have referenced all external dependencies in your MS project file, it ignores those -- you need to use attributes to declare the dependencies of every single test function, whether it's a simple file or a DLL. Eg:

    Code:
    [TestMethod]
    [DeploymentItem(@"A.txt", "Test1Files")]
    public void Test1()
    {
      //************
    }
    Code:
    [TestMethod]
    [DeploymentItem(@"************.dll", "Test2Files")]
    public void Test2()
    {
      //assrapingmonkey****er
    }
    Holy **** is that non-obvious and undocumented.

    Let's not even go into the pathetic speed and lack of customizability.

    STAY FAR AWAY.

    Use NUnit.
    "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
    Ben Kenobi: "That means I'm doing something right. "

  • #2
    Will do.
    <Reverend> IRC is just multiplayer notepad.
    I like your SNOOPY POSTER! - While you Wait quote.

    Comment


    • #3
      I'm still steaming here.
      "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
      Ben Kenobi: "That means I'm doing something right. "

      Comment


      • #4
        How about you explain how it is impossible for a VS2003 developer (consultant) to open a VS2008 project/solution without manually adding all of the files to a new solution

        (Or feel free to explain how to do it correctly, if i'm just a moron...)
        <Reverend> IRC is just multiplayer notepad.
        I like your SNOOPY POSTER! - While you Wait quote.

        Comment


        • #5
          Why would any reasonable person expect old versions of the software to open the new formats?
          "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
          Ben Kenobi: "That means I'm doing something right. "

          Comment


          • #6
            Because it's perfectly compatible, in the sense that if one copies and pastes the text into VS2003, the project compiles fine... it's just C# and ASP.NET, it's not rocket science.
            <Reverend> IRC is just multiplayer notepad.
            I like your SNOOPY POSTER! - While you Wait quote.

            Comment


            • #7
              project/solutions contain specific variables and configuration settings that are certainly not supported in earlier versions.

              If all you use your projects/solutions for is to group files together, then yeah it'd work...but by the same token recreating a project from those existing files is trivial.

              When you use solutions professionally with lots of settings, scripts, build configurations, etc it's much more specific to the VS version.
              "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
              Ben Kenobi: "That means I'm doing something right. "

              Comment


              • #8
                Meh, it should at least read the solutions file and figure out what it can from the file. There's no call for it to just say "Oops, no, don't want to read that, sorry."

                (Also, it would be nice if you could open a folder with a website in it, and auto-generate a default project from it... certainly not possible in VS2003, anyway; haven't had to try it in VS2008)
                <Reverend> IRC is just multiplayer notepad.
                I like your SNOOPY POSTER! - While you Wait quote.

                Comment


                • #9
                  I think there's a lot more dangerous in half-assed reading of an unpredictable file with silent failures.

                  You really should not be opening VS2003 files in VS2008 for many reasons...not the least of which is incompatible technology. VS2003 would completely and utterly break if it tried to open any projects I've had in the past several years.

                  For instance, VS2008 files assume C# 3.5 capability. If you open that in VS2003, you get C# 1.0 capability.

                  The more I think about it, the more ridiculous it is to try to open 2008 files in 2003...
                  "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                  Ben Kenobi: "That means I'm doing something right. "

                  Comment


                  • #10
                    Except if you coded a project in 2003, then sent it to someone (me) who has 2008, then I send it eventually to a third person who has 2003 (again) ... I made some changes but kept it with 2003 compatibility...

                    We eventually fixed the problem by upgrading the other person to 2008 of course, but still C++ wouldn't have this issue...
                    <Reverend> IRC is just multiplayer notepad.
                    I like your SNOOPY POSTER! - While you Wait quote.

                    Comment


                    • #11
                      Originally posted by snoopy369
                      Except if you coded a project in 2003, then sent it to someone (me) who has 2008, then I send it eventually to a third person who has 2003 (again) ... I made some changes but kept it with 2003 compatibility...

                      We eventually fixed the problem by upgrading the other person to 2008 of course, but still C++ wouldn't have this issue...


                      You should never, ever, be swapping files with vastly different Visual Studio versions. This isn't MS Office, this is development tools...you need to have them the same, period. Hell, at our office we freak out if one of us is on VS 2008 SP1 and the other on vanilla VS 2008...there's differences that break even between patchlevels. Massive version differences is just retarded, plain and simple.

                      And as someone who spent 16 months doing C++ analysis and service...C++ absolutely has this problem. Send your C++ you compiled with gcc3 and try to compile it with gcc4, or take your gcc4 code and try to compile it with XL C++ or Intel C++ or VC++...most C++ code isn't as portable as you'd think. There's not a single compiler 100% standards compliant.

                      We also had major C++ problems between versions of XL C++...people who had code that worked in XL C++ 8 wouldn't work in 6 and vice versa. It's life.

                      You need to always have your developers using identical tools across the board...period.
                      "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                      Ben Kenobi: "That means I'm doing something right. "

                      Comment


                      • #12
                        I'll be sure to let my boss know that.
                        <Reverend> IRC is just multiplayer notepad.
                        I like your SNOOPY POSTER! - While you Wait quote.

                        Comment


                        • #13
                          The C++ thing is interesting, not a lot of people account for compiler differences.

                          The most standards compliant C++ compilers are the IBM and Intel compilers, mainly because the people who use these compilers are industry pros almost exclusively.

                          The next most standards compliant C++ compilers are the recent Visual Studio ones.

                          Bringing up the rear...way in the rear...is gcc. gcc compilers enormous amounts of crap code and needs to keep doing that for lots of open source applications and the Linux kernel. New versions of gcc are slowly becoming more standards compliant but they still permit tons of non-standard poor practice C++ conventions just because they're common and they don't want to break their existing codebase.

                          One of the biggest jobs for me at IBM was helping people port their gcc app codebase to XL C++. A lot of developers thought it was a bug that the XL compiler rejected a lot of their code, when their code was just ridiculously stupid and non-compliant...gcc took the C-style approach of "well, you're probably trying to do this...so let's let you". It leads to security problems, unreliable code audits (the code does things that are non-obvious), and general bugginess.
                          "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                          Ben Kenobi: "That means I'm doing something right. "

                          Comment


                          • #14
                            Interesting, I never knew there was so much complication in C++ compilers. (Then again, I didn't do all that much in C++ after college, went over to VB.NET and C#.NET ...)

                            SAS (my job's primary language) corrects your spelling sometimes, but that's about it... but it's quite funny when it does it (as it's rare enough to be amusing).
                            <Reverend> IRC is just multiplayer notepad.
                            I like your SNOOPY POSTER! - While you Wait quote.

                            Comment


                            • #15
                              C++ doesn't help itself with massively complicated Standards. In some cases, the Standards are actually impossible to implement and contradictory. Though I can't recall any examples offhand.

                              The joke is the Standards make a good guideline to writing a C++ compiler...

                              In a lot of ways, that's the advantage of C#/Java. There's basically 1 compiler for each that anyone cares about, period. It was also a standard from the get-go, unlike C++. C++ was a wild language that was almost tamed by ISO with Standards, but after people start writing code it's hard to get them to change or, worse yet, redo their code...
                              "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                              Ben Kenobi: "That means I'm doing something right. "

                              Comment

                              Working...
                              X