Is there any history based BDD test in python?

I mean, we have rSpec, a cucumber in the ruby ​​world. But do we have similar tools in python? How about a robot frame? Can we use it as a history-based BDD test tool?

I ask because I kind of buy BDD, talk about tests.

+7
source share
5 answers

Python freshen is a python cucumber port implemented as a nose plugin.

+5
source

Salad is another port of Python from cucumber. It works well, and the documentation also uses the usual use of Django.

http://lettuce.it/index.html

And here is another blog post that describes BDD with Lettuce and Splinter:

http://cilliano.com/blog/2011/02/07/django-bdd-with-lettuce-and-splinter/

+6
source

You can also take a look at Behave . It is built from the ground up to perform BDD style testing, and not an “addition” to the nose or port from another structure.

+3
source

I see that the choice is a salad, a refreshing and a robot framework.

We use the Robot Framework because of the many reasons that most major

  • It can do almost anything that supports other frameworks + more
  • He has a nice IDE called RIDE
  • The reports that he creates are quite extensive, and also, flexible
  • It has an active and growing community of users.
+1
source

My own experiments led to pyspecs , a minimalistic approach. It is quite easy to get the job done:

  pip install pyspecs

And it is quite easy to use:

 from pyspecs import spec, given, when, then, the


 class simple_addition (spec):
     @given
     def two_numbers (self):
         self.first = 2
         self.second = 3

     @when
     def we_add_them (self):
         self.result = add (self.first, self.second)

     @then
     def the_sum_should_equal_5 (self):
         the (self.result) .should.equal (5)


 def add (a, b):
     return a + b

I would welcome and draw attention / cooperation ...

0
source

All Articles