Is there an interdisciplinary TDD solution?

I want to write a simple color management framework in C #, Java, and AS3. I want to write unit tests only once, and not recreate unit tests in JUnit, FlexUnit and say NUnit.

I am referring to the idea of โ€‹โ€‹an XML file that defines manipulations with an โ€œinstanceโ€ and statements based on the state of an โ€œinstanceโ€ through installation, break and test suite. Then, to have a utility that can convert this XML to xUnit code, for an arbitrary number of xUnits. Before I start spending time developing such a solution, I want to make sure that such a solution no longer exists.

+6
unit-testing tdd cross-language
source share
4 answers

Will FIT / Fitnesse fit your needs?

FIT is an acceptance test platform, not a unit test, but from what you are describing, you want to make sure that the three implementations have the same behavior and not identical designs.

FIT has links to several languages

+4
source share

I think you are too complicated ... you can think of a scripting language that you can use against all 3. I know that Ruby can be used to test Java through JRuby and C # through IronRuby, but I do not know about AS3.

I have never had to do this on my own, but I think that a dynamic language such as Ruby can really allow you to do this without much extra work.

+1
source share

As a side note, you can also try writing a compiler similar to FogCreek (in), the famous Wasabi language, then you can write your code and tests in that language and get the compiler to do its job ... this, of course, is likely to be excessive complicated, but I think it would be much better than trying to define the XML test language ... and maybe a lot more readable.

+1
source share

You can also test Fitnesse with Slim , since Slim should be much easier to implement for new languages โ€‹โ€‹(AS3). I assume this is more about acceptance / integration testing than unit testing, but it might be interesting to learn.

0
source share

All Articles