xunit

What do you need from a test harness?

I'm one of the people involved in the Test Anything Protocol (TAP) IETF group (if interested, feel free to join the mailing list). Many programming languages are starting to adopt TAP as their primary testing protocol and they want more from it than what we currently offer. As a result, we'd like to get feedback from people who have a ...

Why am I getting a "wrong number of arguments (0 for 2)" exception in my Ruby Code?

I'm trying to polish up my Ruby by re writing Kent Beck's xUnit Python example from "Test Driven Development: By Example". I've got quite far but now I get the following error when I run which I don't grok. C:\Documents and Settings\aharmel\My Documents\My Workspace\TDD_Book\TDDBook_xUnit_RubyVersion\lib\main.rb:21:in `test_running': w...

Is it idiomatic Ruby to add an assert( ) method to Ruby's Kernel class?

I'm expanding my Ruby understanding by coding an equivalent of Kent Beck's xUnit in Ruby. Python (which Kent writes in) has an assert() method in the language which is used extensively. Ruby does not. I think it should be easy to add this but is Kernel the right place to put it? BTW, I know of the existence of the various Unit framew...

Implementing xunit in a new programming language

Some of us still "live" in a programming environment where unit testing has not yet been embraced. To get started, the obvious first step would be to try to implement a decent framework for unit testing, and I guess xUnit is the "standard". So what is a good starting point for implementing xUnit in a new programming language? BTW, sinc...

Problem disposing of socket / finalising twice?

I'm working with some code (not mine I hasten to add, I don't trust this much at all) for a class which opens a socket, makes requests and listens for responses, which is throwing an exception in a way I can't comprehend when tested in xunit. I assume the same exception happens "live" but the class is referenced by a singleton so it is p...

Why Fit/FitNesse?

What's the point of using Fit/FitNesse instead of xUnit-style integration tests? It has really strange and very unclear syntax in my opinion. Is it really only to make product owners write tests? They won't! It's too complicated for them. So why should anyone Fit/FitNesse? Update So it's totally suitable for business-rules tests only? ...

Can I create a wrapper around NUnit, MbUnit, xUnit or other testing framework?

How can I create a wrapper around a testing framework? We still doesn't know which testing framework are going to use, but I need to start writing unit tests. With this question I want to know how can I switch from NUnit to mbUnit, xUnit or even MSTest. ...

In xUnit.net, is it possible to run tests in order?

I know you generally should not depend on order for your unit tests, but in xunit is it possible to make your tests run in a certain order? ...

How to make MATLAB xUnit work on MATLAB R2008b (7.7)?

I copied the matlab_xunit folder to C:\Program Files, and included it (and its subfolders) on the MATLAB path. Now MATLAB recognizes new commands such as runtests But this command does not find any tests on the current folder. What I have done wrong? What else can I do? >> runtests Starting test run with 0 test cases. PASSED in 0.0...

What is the community-preferred Ruby unit testing framework?

In the Java space, JUnit is predominately used and in .NET I believe nUnit is very popular. Is a community agreed upon unit testing framework for the Ruby world? Background: I ask because I am new to Ruby and want to practice TDD at same time as I learn Ruby. So far I've only played with Test::Unit. ...

[.Net] Is it possible to change the way unit tests are invoked?

My guess is that the current semantics of unit testing involve actually calling the method, i.e., if I have a method MyTest() then that's what gets called. My question is this: is it possible to somehow change the pipeline of the way tests are executed (preferably without recompiling the test runner) so that, say, instead of calling the ...

How to create a state-based test for a method that calls other methods within the same class?

I have the following code (which I've dumbed down for the question): public void HandleModeInit(int appMode){ switch(appMode){ Case 1: DoThis(); Case 2: DoThat(); Case 3: //no mode 3 Case 4: DoSomethingElse(); ...

How to add times in XSLT?

Hello, I have some output from 3rd party software: Sample XML from the software: <testsuite name="XYZ"> <testcase name="ABC" status="0" time="12.001">Some stuff</testcase> <testcase name="DEF" status="0" time="12,345.001">Some stuff</testcase> <testcase name="GHI" status="0" time="4,321.001">Some stuff</testcase> ...

What is 'Churchillian knock-off'?

Hi, I've read xUnit Test Patterns. http://martinfowler.com/books.html There is 'Churchillian knock-off' expression in Martin Fowler's writes like this... If you go to junit.org, you'll see a quote from me: "never in the field of software development have so many owed so much to so few lines of code". JUnit has been criticized as a minor...

Best automatic test framework for octave

Which is the best framework for automatic testing in octave? Why? ...

Where and how can I learn software testing techniques?

I want to learn how to build “robust” software that is designed to test itself. In other words, how do I implement automated tests in my software ( using java or groovy or c++ ). So I want to know where to learn this (books or websites) and which tools and libraries I will need for this? ...

what is "upstream" program?

I've read "upstream" program from here ... http://xunitpatterns.com/Back%20Door%20Manipulation.html If the data store is external to the SUT, such as in a relational database, the Data Loader can be "just another application" that writes to that data store. It would use the database in much the same way as the SUT but it would get its ...

How to test FormsAuthentication in a asp.net mvc 2.0 app with

Ive made a interface with the following methods: Public Interface IAuthenticationService Sub SetAuthentication(ByVal username As String) Sub Logout() Function IsLoggedIn() As Boolean End Interface My implementation looks like: Public Class Authentication Implements IAuthenticationService Public Sub Logout() Implem...

xUnit testing framework for C

Hi all! I'm developing a fairly simple C project for an embedded device. I'd like to employ xUnit testing. I've settled down with the Check framework (http://check.sourceforge.net/), but it seems it doesn't support function stubs. I remember using a very syntactically similar framework a few years ago that supported stubs, but i can't r...

Reharper runner plugins for xunit and mspec simultaniously

I have successfully used the Resharper 4.5 runner for xunit tests in vs2008. Now I want to try out MSpec and I want to use the Resharper 4.5 runner for MSpec. But I have them both installed I get an error message when starting Visual Studio, that a plugin can not be loaded, because there is already a plugin with the same name loaded. Is...