Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a cross-language TDD solution?

I want to write a simple colour management framework in C#, Java and AS3. I only want to write the unit tests once though, rather than recreating the unit tests in JUnit, FlexUnit and say NUnit.

I have in mind the idea of say an xml file that defines manipulations of "instance" and assertions based on the state of "instance" via setup, teardown and a set tests. Then to have a utility that can convert that XML into xUnit code, for an arbitrary number of xUnits. Before I start wasting time developing such a solution though, I want to make sure no similar solution already exists.

like image 357
David Arno Avatar asked Sep 16 '08 07:09

David Arno


2 Answers

Would FIT/ Fitnesse be suitable for what you want?

FIT is an acceptance test framework rather than unit test framework, but from what you describe you would want to ensure that the three implementations have the same behavior rather than identical designs.

FIT has links to several languages

like image 70
David Dibben Avatar answered Sep 30 '22 17:09

David Dibben


I think you are overcomplicating things... you might consider a scripting language that you can use against all 3. I know Ruby could be used to test Java via JRuby, and C# via IronRuby, but I don't know about AS3.

I have never needed to do this myself, but I imagine a dynamic language like Ruby could really let you do it without a lot of extra work.

like image 33
Mike Stone Avatar answered Sep 30 '22 17:09

Mike Stone