[TIP] Speccer - Simple, specification driven testing tool

vanderson.mota at gmail.com vanderson.mota at gmail.com
Tue Dec 28 11:28:38 PST 2010


i'm not a huge fan of internal dsls, but for the ones who like it,
here's one that follows "BDD style"

https://github.com/hugobr/should-dsl

cheers!

2010/12/28 Juho Vepsäläinen <bebraw at gmail.com>:
> Hi,
>
> I'm currently developing a little testing tool. You can find it at
> https://github.com/bebraw/speccer . It contains basic setup.py and
> instructions in case you want to give it a go. I have yet to upload it
> to PyPI.
>
> So why to write yet another testing tool? This tool aims to simplify
> tests to some sort of acceptable minimum. It has some form of crude
> DSL based on which it generates actual code using unittest. To get a
> better idea, just look at the following test definition:
>
> set up
>    c = myclass.MyClass()
>
> adds two and two
>    c.add(2,2) == 4
>
> fails adding int and string
>    c.add(10, 'foo') raises TypeError
>
> As you can see I ripped everything I could from it. It's pretty
> readable (to me anyway) and quite fun/fast to write this sort of code.
>
> I intend to develop the tool a bit further. I have considered adding
> support for some other target languages (PHP, JS support would be
> cool) as the test definition is quite generic. Some form of code
> generation (get boilerplate that passes tests) might be cool too.
>
> So why I'm writing this post? I guess it might be nice to get some
> feedback from more experienced Python peeps. If you find the tool
> useful, all the better. :)
>
> Sincerely,
> Juho Vepsäläinen
> nixtu.blogspot.com
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>



-- 
Vanderson Mota dos Santos



More information about the testing-in-python mailing list