cgiffard / Behaviour-Assertion-Sheets

CSS-like declarative DSL for web integration testing.
http://bas.cgiffard.com/
138 stars 8 forks source link

Action Chaining #1

Open cgiffard opened 11 years ago

cgiffard commented 11 years ago

Presently BAS has no way of specifying and chaining actions and making assertions on events, or when these actions are taken.

This gist kicked off the discussion. https://gist.github.com/karlkfi/5480124

cgiffard commented 11 years ago

This definitely relies on headless browser support being in place - whether it's PhantomJS or something else.

Originally when I created Bas, I thought of it as a stateless system that would test different pages independently. But it has since been brought to my attention that multi-request flows might need to be tested. I'm not sure whether this is the correct problem domain for Bas, but I'll take it on advisement.

Here's something I posted on the linked gist which I think deserves reiteration here:

One of the key concepts/ideas I had with Bas was that everything should be declarative, not procedural, and relationships between parts of a page and its assertions should be able to be expressed abstractly. Any solution to solve action chaining should meet that as a fundamental aspect of how it works.

I'm fairly confident that there's an elegant way to specify lists of actions and assertions along the way. I'll have a think about the possible syntax and post examples/mockups as I think of them!