{"id":8095,"date":"2017-05-21T13:57:58","date_gmt":"2017-05-21T21:57:58","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vbteam\/?p=8095"},"modified":"2024-07-05T12:36:32","modified_gmt":"2024-07-05T19:36:32","slug":"introduction-to-live-unit-testing-in-visual-basic","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vbteam\/introduction-to-live-unit-testing-in-visual-basic\/","title":{"rendered":"Introduction to (Live) Unit Testing in Visual Basic&#8230; [updated for VS 2017 Update 3 Preview 3]"},"content":{"rendered":"<h2>&#8230;and Why <i>My<\/i> Grandma Invented the Concept!<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/GrannySchindler.jpg\"><img decoding=\"async\" class=\"alignleft size-medium wp-image-8105\" style=\"margin-top: 25px; margin-bottom: -10px;\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/GrannySchindler-225x300-1.jpg\" alt=\"grannyschindler\" width=\"180\" height=\"240\" \/><\/a><\/p>\n<p>Meet late Grandma Grete Schindler. I&#8217;d like to introduce you to my grandma, because this post will be about the essence and purpose of unit testing in Visual Basic, and Granny Grete basically invented the concept of unit testing. Yes, she really did, I kid you not \u2013 she was a very wise woman! When she saw someone in our family doing their work in a hectic rather than a thoughtful way, she always quoted her most favorite Silesian proverb: \u201cKinder, schmei\u00dft nicht mit dem Hintern um, was ihr m\u00fchsam mit den H\u00e4nden aufgebaut habt\u201d \u2013 which roughly translates to \u201cKids, do not push over with your behinds, what you build so arduously with your hands!\u201d. Well, and that\u2019s actually quite simple to understand, is it not? \u2013 Just think of building a sandcastle: You can spend so much effort to build that, and it takes just one misstep to ruin the work of hours.<\/p>\n<p>Doesn\u2019t that also ring a bell when it comes to software development? Especially with large code base software projects, and especially when you and your team need to develop and maintain that over a really long period of time? When a customer calls you and claims to have found a bug, according to that bug\u2019s severity, you will most likely act very, very quickly! Depending on the customer and how mission critical their application is, you may as well act a little frantically or even stressed out. And probably you let yourself be carried to do some imprudent code patches, you would never have done, had you taken some time and kept your cool! And, yes, you fixed the bug with those code edits comparatively quickly. But at the same time, with the code you patched, you changed another behavior in a totally unrelated situation as well, and you are completely unaware of that fact\u2013either because you wrote the code a long time ago, and cannot remember \u201cwhat else it did\u201d, or you did not write the code yourself at all! You just broke the code by fixing a bug. You remember that Facebook meme: \u201cHalf a year ago, only God and I knew what this code did. Now, only God knows!\u201d Doesn\u2019t that sound familiar? Well, that is exactly what Granny Schindler always warned us about: we\u2019re improving here and breaking there. Unit tests prevent that. They are your watchdogs, so that premature code edits like that are becoming more and more unlikely to happen, the higher the coverage of your code base by unit test (watchdog) code becomes.<\/p>\n<p>On top\u2013know this: Introducing unit tests to your projects can have another very positive effect: Unit tests can <i>considerably<\/i> speed up your turnaround times with that ongoing cycle &#8220;code edit, compile, deploy, debug, code edit, compile\u2026&#8221;: Imagine, you have a huge WPF, UWP or ASP.NET solution with tens of libraries, a login procedure, a complex database in the backend, thus with a startup time of about 30 to 60 seconds. When you\u2019re developing a certain algorithm, you need to restart that app countless times, and you\u2019re wasting a lot of time with starting it up, logging on, navigating to the function you are currently implementing and only <i>then<\/i> testing the code you just wrote. In total, it can easily take you 2 minutes to find the right spot to debug. Do that as often as 30 times a day, and you already lost a full hour just for waiting for your app to come up. So, let\u2019s take a look at this first aspect of unit testing, speeding up your development turnaround cycles.<\/p>\n<h2>Speed up your turnaround times with Unit Testing<\/h2>\n<p>Let\u2019s develop a little UWP App, which converts decimal integer numbers to Roman numerals. An app, with which you type in &#8216;1234&#8217;, and out comes that value with the roman representation in the form of &#8216;MCCXXXVI&#8217;. Let\u2019s do this, and let\u2019s fire up Visual Studio 2017!<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Create a new Universal Windows App by picking <i>New<\/i> and <i>Project<\/i> from the <i>File<\/i> menu. In the dialog Visual Studio shows now, find the section <i>Visual Basic<\/i> and <i>Universal Windows<\/i>. From the templates, pick <i>Blank App (Universal Windows)<\/i>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/01_CreateNewUwpProject.png\"><img decoding=\"async\" class=\"alignnone size-large wp-image-8136\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/01_CreateNewUwpProject-1024x626-8.png\" alt=\"01_createnewuwpproject\" width=\"879\" height=\"537\" \/><\/a><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Visual Studio asks you, what versions of Windows 10 you want to target. In this example, we go with the latest Windows 10 version \u2013 but since we do not need the latest Windows 10 functionality for this example, the version at this point does not really matter.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/02_TargetCreatorsUpdate.png\"><img class=\"alignnone size-mediumlarge wp-image-8145\" alt=\"02_targetcreatorsupdate\" width=\"500\" height=\"206\" \/><\/a><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>If you never created an UWP app with Visual Studio on your developer machine, you need to bring Windows 10 into the so-called <i>developer mode<\/i>. Usually, Windows 10 protects you against viruses and other malicious code by only allowing apps from the Windows Store to be installed on your machine. You have to loosen these constraints slightly to deploy a Windows 10 App which you\u2019re developing directly to your machine from within Visual Studio. So, in the dialog, which Windows shows now, allow your machine to be set to the developer mode.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/03_a_EnableDeveloperMode.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8126\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/03_a_EnableDeveloperMode-8.png\" alt=\"03_a_enabledevelopermode\" width=\"666\" height=\"675\" \/><\/a><\/p>\n<ul>\n<li>Let\u2019s quickly design the UI. In UWP apps, as you probably know, we do this in XAML. I don\u2019t want to address XAML here in more detail \u2013 that would be way beyond the scope. So, to get quick results for the demo, just copy the following Gist code, double-click <i>MainPage.xaml<\/i> in the solution explorer to open it, and simply replace the existing XAML Code by pasting it over.<i>\n<\/i><\/li>\n<\/ul>\n<p>As you will see in a couple of seconds: We did not program much yet, we just designed the UI. Still, we can start our app already, so let\u2019s do this, and this is where you instantly spot a problem: A UWP app needs to be deployed every time you worked on its code and restart it, so the turnaround times even on fast machines are considerable. And this is \u201conly\u201d a UWP app which does not have any substantial code yet! When you\u2019re developing a Xamarin Forms App, for example, and you need to deploy to an iOS or Android emulator, turnaround times can be even worse \u2013 the same applies for ASP.NET projects!<\/p>\n<p>So, let\u2019s do something about that:<\/p>\n<p>NOTE: For this sample, we use Visual Studio 2017 Update 3 (actually, only the first <a href=\"https:\/\/www.visualstudio.com\/vs\/preview\/\">Preview of Update 3<\/a> is the current version, while these lines are being written). Update 3 introduces .NET Standard and .NET Core for Visual Basic. You can also use Visual Studio 2017 with an earlier version, but for the following steps, you would alternatively need to create a <i>Portable Class Library<\/i> project in step 2, for which you should choose all available target platforms.<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/04_a_AddingNetStandardProject.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8146\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/04_a_AddingNetStandardProject-8.png\" alt=\"04_a_addingnetstandardproject\" width=\"1017\" height=\"558\" \/><\/a><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>In the solution explorer, add a new project to your solution by bringing up the context menu of the solution\u2019s main node, and clicking <i>Add new project<\/i>. When Visual Studio shows the <i>Add New Project<\/i> Dialog, from the <i>Visual Basic<\/i> section pick <i>Class Library (.NET Standard)<\/i>. Name the new Project <i>RomanNumeralsLib<\/i>. Since there are several types of class libraries project templates, make sure, you got the right one <i>(.NET Standard)<\/i>. Click <i>OK<\/i>, to add the project.<\/li>\n<li>As the name implies, .NET Standard is not really a new platform. Rather, a .NET Standard library project defines a standard which makes sure that the code uses only a certain set of APIs, so a project type, which agrees to it, guarantees to have available all the APIs according to that standard. In our sample, we\u2019re using an UWP project. At the time, UWP only supports .NET Standard up to version 1.6; if you create a new .NET Standard library project, however, its version is set to 2.0 by default. It\u2019s good to know though, that a .NET Standard library makes real sense when it can be used on multiple platforms. Even this does not apply to our example, but if you wanted our library to be used on Android or iOS in Xamarin projects as well, you would need to find the highest .NET Standard version, which is supported by all the target platforms \u2013for Android, iOS and UWP Apps that would currently be .NET Standard 1.4. Let\u2019s pick this version by setting the target framework with the project\u2019s properties dialog, which you can show via the project\u2019s context menu in the solution explorer, and clicking <i>Properties<\/i>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/04_b_PickStandardVersion.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8155\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/04_b_PickStandardVersion-8.png\" alt=\"04_b_pickstandardversion\" width=\"482\" height=\"367\" \/><\/a><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>And while we\u2019re at it, let\u2019s also add yet another project: the actual unit test project. You integrate a unit test in your solution by adding a related <i>Unit Test<\/i> <i>Project<\/i> to it. If you want to unit-test the code of a library, you need a <i>Unit Test<\/i> <i>Project<\/i>, which can consume that library. If you want to unit-test the code of a UWP app, you need an additional <i>Unit Test<\/i> <i>Project (Universal Windows)<\/i> in your solution. But pick wisely! A UWP unit test takes almost as much time to start as a simple UWP app does. In most cases, the actual code to test will not at all be in the UWP app, but in a library\u2013as in our case. This is the reason, that even though we have a UWP app, we add a <i>Unit Test Project (.NET Framework)<\/i> to our solution, and <i>not<\/i> one of type <i>Unit Test Project (Universal Windows)<\/i>!<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/06_AddingUnitTestProject.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8165\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/06_AddingUnitTestProject-8.png\" alt=\"06_addingunittestproject\" width=\"1084\" height=\"570\" \/><\/a><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Before we start unit testing, let\u2019s have something <i>to<\/i> test! First, let\u2019s make the library accessible in our UWP app and also from the unit test project by adding the necessary references. For this to end, in the solution explorer find the branch <i>References<\/i> of the project <i>RomanNumeralsUnitTest<\/i>, from the context menu pick <i>Add Reference<\/i>, and check the project <i>RomanNumeralsLib<\/i> in the dialog, which Visual Studio shows now.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/07_AddingReferences.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8175\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/07_AddingReferences-8.png\" alt=\"07_addingreferences\" width=\"865\" height=\"467\" \/><\/a><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><strong>IMPORTANT:<\/strong> Don\u2019t forget to add the same reference in the UWP project <i>RomanNumerals (Universal Windows)<\/i>!<\/li>\n<li>Now, let\u2019s do some coding. In the Project <i>RomanNumeralsLib<\/i>, replace the code of <i>Class1.vb<\/i> by the following code, and rename the file to <i>RomanNumerals.vb<\/i><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>.<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>This will be our primary subject to unit testing. Let\u2019s do this now: Bring up the file <i>UnitTest1.vb<\/i> from the project <i>RomanNumeralUnitTest<\/i>.<\/li>\n<li>What you see here is the basic stub for a unit test class and a unit test method. Unit test classes are annotated by the <i>TestClass<\/i> attribute, while a unit test method is tagged with the <i>TestMethod<\/i> attribute. If you do not annotate test classes and test methods with those attributes, they cannot be discovered. Let\u2019s replace the content of that file with our first test method. Just copy the code from the following Gist snippet to your code file:<\/li>\n<li>The key code line at this point is the method <i>Assert<\/i>: When the test method <i>Test1to20<\/i> runs, <i>Assert<\/i> provides a series of methods to ensure a certain behavior of the tested code. In our example, we\u2019re using <i>Assert\u2019s AreEqual<\/i> method, which tests if the expected first parameter equals the value of the second parameter. If it does, the check passes, otherwise, it fails and with it, the whole test fails. Since the second parameter is the return value of the method we\u2019re actually testing, this test asserts for the future, that this method always works as expected. And this is basically, how unit tests methods are being written!<\/li>\n<li>Now, to actually run this unit test, we do <i>not<\/i> need to start our app. We control the execution of the various test classes and test methods with the <i>Test Explorer<\/i> tool window, which you can show by clicking<i> Windows\/Test<\/i> Explorer from the<i> Test<\/i> menu. When you now rebuild the Solution, you should see your first Test in the Test Explorer. Take a look at the following animated GIF, which shows you in details, how it\u2019s done:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/08_FirstUnitTestSmall.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8176\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/08_FirstUnitTestSmall-8.gif\" alt=\"08_firstunittestsmall\" width=\"1125\" height=\"554\" \/><\/a><\/p>\n<ul>\n<li>Starting the test method now is simple. Just open the context menu for the <i>Test1to20<\/i> test, and click either <i>Run Selected Test<\/i> or<i> Debug Selected Test<\/i>. With <i>Run Selected Tests<\/i>, the method (or, if you select more than one test method once you got them, the metho<strong><i>ds<\/i><\/strong>) gets executed and tested. Alternatively, you can also <i>Debug Selected Tests<\/i>, which allows you that breakpoints in the test methods and in the code that is being tested are considered. You can debug through the code as you would do it normally during a debug session.<\/li>\n<\/ul>\n<p>And here now is the first important takeaway: Compare the starting time of the test with the app\u2019s starting time. The test is firing up in not even a second while starting the app itself takes about 10-20 seconds \u2013 and we did not include any meaningful code in the UWP app, yet! Developing complex algorithms, which do not have dependencies to a UI or fixed data source like a database, are much easier, quicker and more durable to develop when using unit tests.<\/p>\n<h2>Secure the code you wrote with unit tests<\/h2>\n<p>Now let\u2019s extend the unit test projects by a couple of additional test methods, which you can simply copy from the following Gist snippet into the <i>UnitTest1.vb<\/i> file:<\/p>\n<p>When you recompile your solution and click on <i>Run all<\/i> in the test explorer, you see this:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/09_FailedTests.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8186\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/09_FailedTests-8.png\" alt=\"09_failedtests\" width=\"440\" height=\"529\" \/><\/a><\/p>\n<p>The test explorer tells you, that the unit test method <i>TestTensAndHunderds<\/i> has failed. And, according to the exception message text, the actual and the expected results were different. You can open the context menu of <i>TestTensAndHunderds <\/i>now, and Debug the selected test. In that case, the debugger stops at the code line whose assert method caused the exception, which you see here:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/10_FailedTest.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8196\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/10_FailedTest-8.png\" alt=\"10_failedtest\" width=\"1387\" height=\"584\" \/><\/a><\/p>\n<p>When we look closer at the unit test code, we must admit that it looks absolutely OK: &#8220;XLIX&#8221; <i>is<\/i> the roman numeral for 49. Which means: There must be a bug in our algorithm code, and \u2013 low and behold \u2013 if we look closer at the algorithm, we quickly find out, that there is a typo in the code line which defines all the existing letters for the roman numerals. So, let\u2019s see what happens when we correct that bug!<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/11_CorrectingBug.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8215\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/11_CorrectingBug-7.gif\" alt=\"11_correctingbug\" width=\"1088\" height=\"594\" \/><\/a><\/p>\n<p>Bug fixed, life is good! As you can see: Developing with the aid of unit tests in most scenarios can speed up the process enormously. But the most important purpose of unit tests is neither the increased turnaround times nor is it that your code is bug-free for the tested parts from the beginning. The most important aspect is, that you are not introducing any breaking changes to the behavior of your solution, as you and your team are going forward in modifying and extending the already existing, tested and deployed code.<\/p>\n<h2>\u201cI changed the code \u2013 does the rest still work?\u201d<\/h2>\n<p>Consider for example, that you found the bug, and while correcting it you introduced a new one, since your fingers kind of &#8220;slipped&#8221; over the keyboard. Or somebody called you at that exact moment you were editing the code line which contained the bug! You then changed the definition of the roman numerals from &#8220;IVXCLMD&#8221; to &#8220;IVXLLMD&#8221;: You accidentally corrected the first occurrence of the &#8220;L&#8221;, but you forgot to also replace the following existing &#8220;L&#8221; by the &#8220;C&#8221;. Now, without unit tests, what would happen? You would test the app by entering 49 and check if the result was &#8220;XLIX&#8221;, would you not? Because <i>that<\/i> was the value, that failed before. And now it works! So, you tested your change by starting the app, verified it to be OK, checked in your changes, and deployed the new version to your customers. But should you not rather have really tested every other combination that you tried out while you were developing the algorithm? Because only then you would have caught the bug, you just accidentally introduced! In a stressful situation, you simply would have not. It is just too much of an effort to test the same cases, you tested manually while developing the algorithm, over and over and over again. And <i>this<\/i> is the biggest in-favor-argument of unit tests: Writing the test code for it, while you\u2019re developing such an algorithm, or \u2013 if you want to start introducing unit tests for solutions, which weren\u2019t previously covered by them \u2013 writing unit test for every bug you eliminated, kind of captures, saves, and makes repeatable via code what you usually would have done manually to test your code. And therefore, writing unit tests does not really mean additional effort. It is just a <i>different<\/i> kind of effort. On top, there is no need to have a 100% coverage of your code through unit tests. If you aim for 70-80%, and you finally come up with 50% that\u2019s a respectable outcome! But even if you only make 0.1%, it is still more than worth it \u2013 the quality of your code is much better beginning with the first unit test you introduced to the solution.<\/p>\n<h2>Live Unit Testing with Visual Studio 2017 Enterprise<\/h2>\n<p>The Enterprise Edition of Visual Studio 2017 provides an even better unit testing experience. It introduces a feature called <strong>Live Unit Testing<\/strong>, and if you look at the following animated GIF, you will understand instantly, what\u2019s it all about, especially now, after you just read the previous paragraphs.<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/12_LiveUnitTestingVB.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8225\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2017\/05\/12_LiveUnitTestingVB-7.gif\" alt=\"12_liveunittestingvb\" width=\"1470\" height=\"1024\" \/><\/a><\/p>\n<p><strong>[UPDATED for Visual Studio 2017 Update 3 Preview 3]<\/strong> With the introduction of Visual Studio 2017 Update 3 Preview 3, Visual Basic contains the same Unit Test Templates as C# does. An earlier version of this post stated, that there are some additional steps necessary, to get Live Unit Testing working in VB. This is no longer the case.\nRather, the one thing left to do is to switch on Live Unit Testing! For that, from the <i>Test<\/i> menu, pick <i>Live Unit Testing<\/i>, and click <i>Start<\/i>.<\/p>\n<p>You should now be able to experience Live Unit Testing, as you can see it in the animated GIF above!<\/p>\n<p>IMPORTANT: Live Unit Testing uses considerable processor workload and with that battery power, and you probably do not want to use it, when you&#8217;re developing with a notebook running on battery.<\/p>\n<p>Also, Live Unit Testing allows you to perform some basic configurations. To that end, from the <i>Tools<\/i> menu, select <i>Options<\/i>, and find the section <i>Live Unit Testing<\/i>. Here, you can configure your Live Unit Testing experience by setting the appropriate parameters.<i><\/i><\/p>\n<p>That&#8217;s it for today!\nAnd as always: try all that amazing stuff for yourself, explore, and test, test, test!\nSo long, and don&#8217;t forget to follow me @loeffelmann on Twitter!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8230;and Why My Grandma Invented the Concept! Meet late Grandma Grete Schindler. I&#8217;d like to introduce you to my grandma, because this post will be about the essence and purpose of unit testing in Visual Basic, and Granny Grete basically invented the concept of unit testing. Yes, she really did, I kid you not \u2013 [&hellip;]<\/p>\n","protected":false},"author":9483,"featured_media":8818,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6,14,195],"tags":[91,96,159],"class_list":["post-8095","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-tips-and-tricks","category-visual-basic","tag-klaus-loeffelmann","tag-live-unit-testing","tag-unit-testing"],"acf":[],"blog_post_summary":"<p>&#8230;and Why My Grandma Invented the Concept! Meet late Grandma Grete Schindler. I&#8217;d like to introduce you to my grandma, because this post will be about the essence and purpose of unit testing in Visual Basic, and Granny Grete basically invented the concept of unit testing. Yes, she really did, I kid you not \u2013 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/8095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/users\/9483"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/comments?post=8095"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/8095\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media\/8818"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media?parent=8095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/categories?post=8095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/tags?post=8095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}