Getting started with Pex in Visual Studio 2008

Published August 24th, 2009 Under Software Testing | Leave a Comment

Nikolai Tillmann and Peli de Halleux give a short tutorial on Pex, an automated white box testing tool for .Net. The tutorial is a pair-programming session where they show us how to get started with Pex in Visual Studio, starting from an (untested) piece of C# code:
* how to use Pex to explore the behavior of any method in your code,
* how to save the exploration results into a unit test suite,
* how to improve the generated parameterized unit tests to leverage Pex code exploration engine.
If you want to follow up the steps on your machine as well,
* Download Pex from DevLabs
* Download the code example
* Ask your questions in the forum


Get Microsoft Silverlight

PowerMock

Published August 24th, 2009 Under Software Testing | Leave a Comment

PowerMock can be used to test code normally regarded as untestable! Have you ever heard anyone say that you should never use static or final methods in your code because it makes them impossible to test? Have you ever changed a method from private to protected for the sake of testability? What about avoiding “new”? Think again! PowerMock lets you mock static methods, remove static initializers, allow mocking without dependency injection and much much more. And it works just as well for J2EE as J2ME! This presentation will give the audience a good understanding on how to easily unit-test your code without the limitations of the common mock frameworks such as EasyMock and JMock.

Pex – Automated Exploratory Testing for .NET

Published August 21st, 2009 Under Software Testing | Leave a Comment

Pex is a white-box test generation tool for .NET. Starting from a hand-written parameterized unit test, Pex analyzes the program-under-test to determine relevant test inputs fully automatically. To this end, Pex executes the program multiple times with different inputs while monitoring the taken execution paths. Pex uses a constraint solver to determine new test inputs that will exercise different execution paths. As a side effect, Pex may find errors in the program. The result is a traditional unit test suite with high code coverage. In addition, Pex suggests to the programmer how to fix certain errors. Pex is integrated into Microsoft Visual Studio.

Know your units

Published August 18th, 2009 Under Software Testing | Leave a Comment

While there is certainly more to testing than unit testing, and more to a well-rounded approach to development than just testing, a failure to appreciate the role and practice of unit testing can lead to disappointment or a skewed notion of testing as a programmer’s responsibility. This session aims to look at some issues, examples and counterexamples that help to highlight some of the problems and offer some solutions.

Good Test, Better Code – From Unit Testing to Behavior-Driven Development

Published August 13th, 2009 Under Coding, Software Testing | 1 Comment

“Testing is design”; “Unit tests are documentation”; “Tests are specifications”. These are sought-after rewards of developer testing practices, but simply writing tests or even writing tests before writing production code doesn’t make these wishes come true. When we take up unit testing, we initially tend to do things a certain way. Over time we might adopt test-driven development, mock-objects, and ultimately we might adopt the specification and design practices that lead to the lauded benefits of self-documenting code, design through test, and ultimately to a greater level of agility. This presentation walks through some of the principal phases of evolving basic testing skills toward sustainable agility through test-driven, client-driven, and behavior-driven programming, touching on unit-testing, mock objects, test-driven development, behavior-driven development, and domain-specific languages for testing.

TDD: It’s About More Than Just “Testing”

Published July 24th, 2009 Under Coding, Software Testing, TDD | Leave a Comment

Recently, in the Rails community, there has been an upsurge of interest in testing. For instance, in the past year alone, we’ve seen the introduction of a bevy of new testing-related gems (i.e. context, cucumber, factory_girl, remarkable, webrat, etc.). These are all good things. And yet do we still see the forest for the trees? While testing improves code quality, facilitates refactoring, and eases debugging, these are not ends unto themselves. This point often seems to be lost as the “testing” drum is beaten ever louder in the Ruby on Rails community. This talk will attempt to engage the audience to rethink WHY they write tests via argument and example.

http://scotland-on-rails.s3.amazonaws.com/1A05_EvanLight-SOR.mp4

Isolation Frameworks: Learning how to validate expectations

Published July 21st, 2009 Under Software Testing | Leave a Comment

In this episode we are going to continue our series on learning how to use an isolation framework (Rhino Mocks) to help create simpler and more reliable unit tests. We will focus our learning this time around on the various ways you can setup and validate expectations on your stubs/fakes. Validating these expectations will allow your to confirm in tests your dependencies are being used in the manor expected.

http://www.dimecasts.net/Content/WatchEpisode/127

Resources
Rhino Mocks Home Page
Episode Source Code

Isolation Frameworks: Learning how to Stub & Fake Data

Published July 20th, 2009 Under Coding, Software Testing | Leave a Comment

In this episode we are going to start learning how to use an isolation framework (Rhino Mocks) to help create simpler and more reliable unit tests. We will start off our learning experience by learning the basics. We will be taking a look at how to setup stubs/fakes in order to hard wire return values for our objects/methods.

http://www.dimecasts.net/Content/WatchEpisode/125

Resources

Rhino Mocks Home Page
Episode Source Code

More Test Driven Development With Javascript: JsTestDriver

Published June 18th, 2009 Under Software Testing, TDD | Leave a Comment

Demonstration of JsTestDrive technology and how you can use it to TDD your JavaScript code.

Good blog  posting evaluating JsTestDrive

Learning Hudson: Setting up to run and report Unit Test results

Published June 15th, 2009 Under Software Testing | Leave a Comment

In this episode we will continue taking a look at how to setup the Hudson build server for usage in a .net environment.  We will be taking a look at how we can use Hudson to report our Unit Tests results after each build. We will be looking at both reporting NUnit and MSTest results and will also show how you can convert MSTest results into NUnit results in order to report all tests in a single screen.

http://www.dimecasts.net/Casts/CastDetails/116

« go backkeep looking »