What is the correct way to test your C # WinForms code in Visual Studio 2008?

I am writing an application in WinForms C #, whose length exceeds 90 thousand lines. I am not a very experienced coder and after some lines of code (depending on whether it is something new or something that I have done many times before), I run my project using F5 in Visual Studio to make sure everything that I did works as I wanted it.

For instance:

if the data from SQL filled in the ListView correctly
 if the sort ListView working properly (the new integrated feature)
 If docx and docx creates works created with the correct formatting
 If the calculation is performed correctly

Is this the right way to do this? Or are there better ways? At the moment, I launch my application in about 5-10 seconds, so this is not very important, but maybe there is better than doing it, as I do it.

I encode this application on only one computer.

+3
source share
3 answers

Given the size of the codebase, it seems that it does not have the ability to completely restart from scratch to restructure the code.

, Test Driven Development (TDD) , , , , . TDD,

, , , , , , , .

, , . , , , , , , , .

, , , . .

, , -, , , , , .

+1

Test Driven Development!

Visual Studion: Visual Studio

MSDN :

  • Visual Studio Team Test
  • , .
  • - Team System Visual Studio 2005
  • Microsoft Visual Studio Team Edition
  • Unit Test Frameworks Visual Studio 2005 Team System
  • -

+6

SQL ListView/

ListView ( )

winforms ( -, Watin), , , NUnitForms. winforms , , , .

, , .

docx docx

You can check if the file exists in unit test. For proper formatting - the best way to achieve this is likely to be adhoc tests - someone is looking at the result with a set of tests written in a script (usually in Excel).

If the count is done correctly

This is the main food for unit tests, for this there is about 6.NET framework. One is already built into Visual Studio 2005+.

+1
source

Source: https://habr.com/ru/post/1733176/


All Articles