Greetings!! I’m Rong Lu, Program Manager with the Visual C++ team.
It’s been extremely exciting in Atlanta at TechEd North America 2011!
Terry Leeper, Diego Dagum and I had a chance to be at TechEd and joined the announcement of Application Lifecycle Management (ALM) roadmap in Visual Studio 11. On Monday, Jason Zander announced ALM Roadmap in Visual Studio 11 (check out his blog post for the entire roadmap and details), and then Cameron Skinner did a demo intensive foundational session which showed lots of the ALM features we’re putting in VC11 (check out his blog post and session recording).
But you may ask: so, what does it mean to C++ developer teams? Terry and I gave a talk about this on Tuesday at TechEd (check out recording if you missed it! ) and short answer is C++ has made up a lot of ground and nearly all the VC11 features work as well (the only exception is the code cloning feature which we’re working on to enable for C++). In the session, we talked about what’s already available in VS 2010 for C++ as well as highlighted and demonstrated some of the new things will be available in VC11 that might be especially interesting to C++ developer teams.
Here is a list of what these new features are in VC11 (check out Cameron Skinner’s session recording for demos on them):
Pretty cool, eh? And now I’d like to highlight some of the new features that will be especially useful to you C++ developer teams (hope you feel the same! ). Check out our TechEd session recording for demos of these features as well.
Static Analysis (aka Code Analysis) can help you to identify common coding errors before the application runs. It’s already available in VS 2010 (works for C++!), and in VC11 the experience will be significantly enhanced.
Yes, we brought it to native C++ world. The set of architecture tools can help you visually discover the architecture of your application, design architecture and enforce the implementation to be compliant.
Dependency diagram by binary
Dependency diagram by include files
Create a layer diagram and run validation
Errors are reported if any architecture violations
In VC11, you will be able to write unit tests for your native C++ applications. The unit tests can be written in C++, and run in the unit test framework which itself is also native!
Now you’ve got unit tests, and here comes code coverage which is well integrated with the unit test framework. You can get code coverage data by running the unit tests and learn how much of the code has been covered by the tests. The enhanced code coverage feature not only works great with the native unit test framework, but also will work the same way for managed test frameworks. In addition, it now does dynamic binary instrumentation as oppose to static binary instrumentation in the past, so it's also a lot easier to use!
Hope you would like these features! Look forward to hearing what you think of them.
Best Regards, Rong.-
PS: our session at TechEd on all these was just posted in Channel 9. [Watch it here] Enjoy!
Glad to know. nice blog, wonderful talk!
All of these wonderful tools you guys are providing, and my company will always be too far behind to take advantage *sigh*.
I'm probably just spoiled, but oof, that is one ugly (verbose) unit testing API. I guess it has to look similar to your managed test framework (for political or technical reasons), but all that boilerplate code seems like a pretty good way to ensure tests never get written.
Thank you for your feedback! I'd like to understand which particular unit testing APIs you think are verbose. Are you refering to the test attributes? Like BEGIN_TEST_METHOD_ATTRIBUTE?
So I've read half the post, and I still don't know what ALM stands for. Searching gives a long list of possible meanings for ALM. I'm pretty sure you don't mean American Leprosy Missions, but it's not clear what you do mean. I'm guessing the A stands for Agile, but I'm still not sure.
Sorry about that, Adrian. Stands for "Application Lifecycle Management." We fixed the post to reflect so.
These are all very nice improvements for us C++ devs. A few comments:
1. I'm with jalf, the macro-based test framework API is pretty hideous. I am referring to the BEGIN_TEST_METHOD_ATTRIBUTE, TEST_METHOD, etc..
2. One issue in the past for our existing Static Code Analysis it that we need to reuild everything with /analyze and once I fixed a bug, we lost all the other analysis results unless I saved the output window contents to a file. Once I did that, I lost the line coloring, etc. I need to hunt by hand for the issues (or redo a full /analyze build). Will I be able to analyze and re-analyze w/o a full rebuild to test my fixes as I make them? (let me know if this doesn't make sense).
3. Will there be a way to export our coverage results to an output file for further analysis by other tools? We'd like to publish the results for people to examine outside of VS.
4. I am assuming all this works in mixed-mode apps (combination of C++/CLI and native .cpp files in the SAME project -- not in different projects!) Can you confirm that?
5. C++ has been lacking Code Snippets -- is that being added to v.Next? It might ease the pain of the unit test macros to have snippets for them!
I just realize that I asked the same issue as #4 in your other post so ignore that one here. Sorry to duplicate.
Is the unit test framework portable enough to compile with other compilers like GCC, XL C/C++, and Sun Workstation?
Are there any binaries or library dependencies that come with unit test framework?
What a nice Syntax Highlighting! Is it vNext feature? Or is it VisualAssist?
Unit testing for C++, MFC style! This is hilarious. Thanks, but no thanks.
Yes, color syntax highlighting is a new feature in vNext, however in general we aren’t disclosing new IDE features at this time yet. Stay tuned!
Can't you guys first focus on the complete C++0x feature set and then add more useless things? Also whenever I'm forced to upgrade the IDE it becomes slower and slower per each new version.
Also I submitted a few bugs which aren't resolved in SP1 yet, which is kinda disappointing.
@Rong Lu: Have you taken a look at www.levelofindirection.com/.../unit-testing-in-c-and-objective-c-just-got-easier.html ? That's what I'd like my unit tests to look like. As short and concise as possible, as few macros as possible, and just a nice, simple, intuitive and easy-to-remember API. And of course, it's header-only, making it really really easy to set up and use.
Like I said, I'm spoiled. But when the language makes it *possible* to define such an API, anything less ends up feeling really painful.