[TIP] Speccer - Simple, specification driven testing tool

Olemis Lang olemis at gmail.com
Tue Dec 28 12:15:03 PST 2010


Hello !

Good to know there are more libs for testing in Python !

JFTR: There are a few libs for BDD (specially clones of
Cucumber's Gherkin engine ...) in Python . You might want to
see this list [1]_ . Probably you could borrow some ideas
from there ...

;)

.. [1] BDD @ Wikipedia
         (http://en.wikipedia.org/wiki/Behavior_Driven_Development#Tools)


On 12/28/10, vanderson.mota at gmail.com <vanderson.mota at gmail.com> wrote:
> 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
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>


-- 
Regards,

Olemis.

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:



More information about the testing-in-python mailing list