Testing! Testing! Testing!

Everyone talks about testing, but who does it?  In a move-left environment this is put on the developer and in a move-right environment this may be performed by a testing team.  In either case testing is the process of breaking the application, if you can.  Breaking the application is defined as not fulfilling the requirements documentation, is there a situation that may fail?  I am going to lay out a development process that I believe will work for new development, but you will need to do some customizing for applications that already exist.  The reason for the customization is that there is a possibility you may find bugs that the estimator may not have intended to correct.  The best thing to do is to start testing only the changes you are making and verify that you are not inserting bad code.  You can leave testing of the rest of the application for future projects.  As part of your testing process you will need to have a way to log the defects that are found and when they are corrected.  Microsoft does have a Testing Center, but Testing Center provides access to the test hub in Visual Studio Team Foundation Server and Visual Studio Team Services and is not part of VS2017 Community.  You may also need to have in place a Change Log Process should the testing produce an outcome that was assumed and never documented in the Functional Documentation or the Technical Documentation.

Visual Studio supports many different testing frameworks MSTest, NUnit and Moq are just a handful.  In the link I provided for MSTest the example there is using the VS2017 Enterprise, which has more bells and whistles.

Now the process I would follow for development of a new application is take the “Technical Document” and paste it into a single application file and in the case of C# it could be something to the effect of MyProgram.cs.  You would then select all that you pasted in and make it comments, which is easy to do.  I suggest to use the //this is a comment, instead of the /* this is a comment */, because you are going to break this up into your methods.  As you are creating the methods just have the comments that states what it will perform.  If you have a method that will do this and that you should look at breaking that down to one item.  An example would look like this:

static void FutureFeature()
    // Explain what the FutureFeature is to do.
    throw new NotImplementedException();

Now the next step is to create your test cases for your methods, at this point you have to decide which framework you want to use. MSTest, NUnit, Moq or whatever is your organizations standard is.  You write your test code based on the test cases provided to you from the person who developed them, if it’s not yourself.

VS Community doesn’t support automated tests and the tests are considered to be “White Box” testing.  White Box testing is when you have the knowledge of the code and you are testing the method based on that knowledge.  When building the test cases they are for unit testing only and you don’t want to be testing calls to databases as that would be considered End-to-End testing.  In the testing project you will have something like this:

public class UnitTest1    
        public void FutureFeaturetest()

To add MSTest to your application you need the following items:

Using the NuGet Packet Manager locate MSTest and install

  • MSTest .TestAdapter
  • MSTest .TestFramework.

To add NUnit to your application you need the following items:

Using the NuGet Packet Manager locate NUnit and install

  • NUnit by Charlie Poole
  • NUnit. Runners by Charlie Pool
  • NUnit. ConsoleRunners by Charlie Pool
  • NUnit. Console by Charlie Pool
  • NUnit3TestAdapter by Charlie Pool
  • NUnit. Extention.NUnitProjectLoader by Charlie Pool
  • NUnit.Extention.NUnitV2ResultWriter by Charlie Pool
  • NUnit.Extention.NUnitV2Driver by Charlie Pool

To add Moq to your application you need the following items:

Using the NuGet Packet Manager locate Moq and install

  • Moq by Daniel Cazzulino

There is information you can get from Microsoft Virtual Academy

I don’t want this to get to long so I will continue this for a little longer.  If you have questions please leave a comment or if you like what you are seeing like and share with your friends.  Please subscribe to my blog.


VS2017 Release- Day 2

Day 2 of the party continues and I amvs2017.png surprised by some of the comments regarding of all things, the ICON you click on to start VS2017.  I found FROM WHICH PART OF THE HELL DOES THIS ICON COME FROM?” and “I have to Hide the ICON” now the icon really has nothing to do with the functionality of VS2017, but it shows how dedicated users of this tool are.  All the icon does is open a window to possibilities of what can be created on the desktop, web/cloud and mobile for Android and IO’s.

If you install the total environment it will take up about 50 GB.  One thing about the install is you do not have to install everything.  If you’re not doing “F#” don’t install it, if you’re not a game developer don’t install Unity or Unreal.  You can save a lot of space if you never and I do mean never plan to develop for mobile.

Here are some freebies I have found so far, I like sharing the free stuff I locate while developing.  The first is 60 days of free training from Xamarin, if your part of the group that installed this week.

Another freebie I found was from Syncfusion, but only for those running the Community Edition which is great $15,960  for free.  As I find more I will post them here to let you know all about the items you may want to take a look at.

 Microsoft likes to mention a lot of things as free, but they don’t make it clear if its for VS2017 Community or Enterprise.  I hope to dig through these in the coming days and see what I can find.  If you have not downloaded VS2017 yet you should get on that now.