Project Description
StoryQ is a portable (single dll), embedded BDD framework for .NET 3.5. It runs within your existing test runner and helps produce human-friendly test output (html or text). StoryQ's fluent interface adds strong typing, intellisense and documentation to your BDD grammar.

What does StoryQ do?

Given the following plain text story:

Story is Data Safety
In order to Keep my data safe
As a User
I want All credit card numbers to be encrypted
With scenario submitting shopping cart
Given I have typed my credit card number into the checkout page
When I click the Buy button                                     
And the browser posts my credit card number over the internet
Then the form should be posted over https

When we represent this in C# with StoryQ:

note that StoryQ comes with a GUI that can convert this automatically for you

using StoryQ;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace StoryQ.Demo
{
    [TestClass]
    public class DemoTest
    {

        [TestMethod]
        public void PassingExample()
        {
            new Story("Data Safety")
                .InOrderTo("Keep my data safe")
                .AsA("User")
                .IWant("All credit card numbers to be encrypted")
                .WithScenario("submitting shopping cart")
                .Given(IHaveTypedMyCreditCardNumberIntoTheCheckoutPage)
                .When(IClickThe_Button, "Buy")
                .And(TheBrowserPostsMyCreditCardNumberOverTheInternet)
                .Then(TheForm_BePostedOverHttps, true)

                .ExecuteWithSimpleReport(MethodBase.GetCurrentMethod());
        }

Then the output of the test runner will be:

DemoTest.PassingExample : Passed
Story is Data Safety
  In order to Keep my data safe
  As a User
  I want All credit card numbers to be encrypted

      With scenario submitting shopping cart
        Given I have typed my credit card number into the checkout page => Passed
        When I click the Buy button                                     => Passed
          And the browser posts my credit card number over the internet => Passed
        Then the form should be posted over https                       => Passed

And there will be a report generated that looks like:

StoryQPassingReport.png

You can see a full example, including pending (not yet implemented) and failing tests here

!Understanding StoryQ
this section of the documentation is under construction, please bear with us
If you are new to BDD, we recommend you start with the BDD Primer.
If you've done BDD in .Net before, you might want to know what makes StoryQ different.
Or maybe you're ready to write your first StoryQ test.
Alternatively, you can read about how StoryQ works.

StoryQ was built with Continuous Integration in mind.

The fluent interface/grammar in StoryQ is generated from a simple DSL, and is fully customizable. You will have to download, edit, and rebuild StoryQ, but this is really easy to do...

Last edited Jan 19, 2010 at 10:04 AM by robfe, version 16