Skip to main content

82 posts tagged with "programming"

View All Tags

Active Directory and WCF Configuration Woes Resolved

· 6 min read

Configuring a WCF service across security boundaries can be a tricky business, or so I learned recently. Testing went well, but the move to production failed for a WCF client/server scenario, with the client application encountering an error: SOAP security negotiation with '<myEndpointAddress>' for target '<myEndpointAddress>' failed. See inner exception for more details. Inner exception: The Security Support Provider Interface (SSPI) negotiation failed.

From Ruby to Gherkin: Building Automated System Tests, pt 2

· 4 min read

image depicting a ruby and gherkin

Follow-up to Building a Test Script Environment with C# and IronRuby, pt 1, wherein we change emphasis from coding tests in Ruby to writing them in English (Gherkin) with the help of SpecFlow.

After that October post, I managed to construct a full system/regression test suite for a key data-management application, using the combination of Ruby and C# as described. My team has been able to go through several cycles of…

C# + IronRuby: Building Automated System Tests, pt 1

· 3 min read

We build a lot of console applications, and Windows services, that process inbound and outbound files in one way or another. Most depend on configuration data and some load (or unload) business data from a database, in addition to accessing the files. Testing these has always been a chore, to say the least: configurations change, data are deleted, and there's never enough time. After building a few rudimentary tools that have helped, necessity, and Agile Testing: A Practical Guide for Testers and Agile Teams, has convinced me that it is time to get serious about system/integration test automation, just as I did about unit test automation a few years ago. This is the first of a n-part series of posts on this process

Review: Growing Object-Oriented Software, Guided By Tests

· 3 min read

Growing Object-Oriented Software, Guided by Tests by Steve Freeman and Nat Pryce

I did not realize how much I still have to learn about writing good object-oriented (OO) code, and about hewing to a tight test driven development (TDD) methodology, before I read Growing Object-Oriented Software, Guided By Tests. My education in OO and unit testing has been largely theoretical, with no time spent directly learning from experienced OO programmers; my best mentor was a COBOL coder. Books like Design Patterns: Elements of Reusable Object-Oriented Software ("Gang of Four"), Patterns of Enterprise Application Architecture, Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development, Xunit Test Patterns: Refactoring Test Code, and others are wonderful but have few detailed real-world business-case examples.

Moles: No Longer Fit for Unit Tests

· 3 min read

No moles

Moles is a powerful and useful framework for unit testing. Or was. But even then, it was overused (at least by me). But no more!

The first clue that I might need to walk away from Moles was the recent difficulty another developer was having in trying to get a unit test project up-and-running on his computer. I had installed what was current in early 2011, and he had installed the current version from last 2011. Turns out there was a significant change – the config file no longer worked. We had to update the assemblies correctly on my machine, rebuild many times, and fool around with manually removing some assemblies. It got confusing and messy. I suppose that's why MS still labeled this version as < 1.0.

Test Naming Convention

· 3 min read

Historically I've advocated naming test methods after the method under test, in order to help find the tests when you need to modify them. Growing Object-Oriented Software, Guided by Tests has shown me that this is a relic of a code-first mentality rather than good application of test driven development, primarily in the section "Test Names Describe Features" (ch 21). "Test driven" development implies that we do not know the name of the method we're going to test. But we do know the functionality (feature) that we are going after, and that knowledge should be used when writing out a test name. For example:

safnet logo