1 / 7

Test-Driven Development (TDD)

Test-Driven Development (TDD). In Traditional Software Development. 1. Write Program First. 2. Create a UI. 3. Test it Later. Developer. In Test-Driven Development. 1. Test First. 2. Write Later. Developer. TDD Cycle. Tools. Nunit for .NET JUnit for Java

Download Presentation

Test-Driven Development (TDD)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Test-Driven Development (TDD)

  2. In Traditional Software Development 1. Write Program First 2. Create a UI 3. Test it Later Developer

  3. In Test-Driven Development 1. Test First 2. Write Later Developer

  4. TDD Cycle

  5. Tools • Nunit for .NET • JUnit for Java • MS Test for Visual Studio 2008 • And many more…

  6. Sample Code in NUnit Code being tested Unit Test using System; using System.Collections.Generic; using System.Text; using NUnit.Framework; using MyApp.DAL; namespace MyApp.Test { [TestFixture] public class MyTestClass { [Test] public void AddTest() { Class1 myClass = new Class1(); int result = myClass.Add(1, 1); Assert.AreEqual(result,1); } } } using System; using System.Collections.Generic; using System.Text; using MyApp.DAL; namespace MyApp.DAL { public class Class1 { public int Add(int x, int y) { return x + y; } } }

  7. Nunit Application • GUI Application indicates that code was Failed

More Related