[Seaside] [ANN] SeasideTesting recovered from oblivion

Sean P. DeNigris sean at clipperadams.com
Tue Oct 24 13:23:32 UTC 2017


NorbertHartl wrote
> Cool. Need to think where it is useful. On the one hand testing without
> external components is good. On the other hand you can only test very
> simple stuff with it.

In the Ruby RSpec/Cucumber world, testing is though of as two concentric
circles. First are the unit tests which are blazing fast because you
mock/stub out everything, then your acceptance tests which test the
application as a whole. So you only run the real (slow) tests after the fast
tests have all passed. Even in the Cucumber acceptance test cycle, there are
three options:
1. Direct Model Access - similar to unit tests and is useful for setup code
or for code that is cumbersome to simulate
2. Simulated browser - uses a framework to simulate the actual
get/put/post(s). When I was programming in Ruby, one big limitation was that
you could not test JS this way.
3. Automated browser - e.g. Selenium

It was a bit of an art form to figure out which technique to apply in each
situation, balancing ease with testing value.

For anyone interested in TDD, I would highly recommend investigating the
rspec/Cucumber process which IMHO took Smalltalk's original invention and
strapped rocket boosters to it! The RSpec and Cucumber books are great
places to start. Also, check out Dan North's BDD (Behavioral…) philosophy on
which the frameworks are based. One of my dream projects is to take what
they did, and turn it from dead text files into a real model in a live
Smalltalk image. That would be truly special, but in my experience hits a
double blue plane wall - Smalltalkers think "We can't learn anything from
Ruby. We invented TDD! BDD is just a trendy acronym for what we've been
doing for decades" (spoiler alert - it's not) and Rubyers have the
all-to-familiar "OMG, an image?! Where are my beloved files?! I can't use
emacs?!?! Nooo!!!"*

* yes, it seems someone made it so that you can use emacs with Pharo, but
you get the idea



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Seaside-General-f86180.html


More information about the seaside mailing list