Can a test be debugged using StoryTeller ?

31 views
Skip to first unread message

Winder

unread,
Oct 3, 2011, 3:00:44 PM10/3/11
to StoryTeller Users
When developping complex tests, debugging the test that is being
runned is something I need to do often.

I'm starting to use StoryTeller for a new project here, but so far I
can't find a way to debug the test while it runs.

Can it be done?

Thanks

Jeremy D. Miller

unread,
Oct 3, 2011, 3:08:15 PM10/3/11
to storyteller-...@googlegroups.com
Yup, you can either:

1.) attach a debugger to the UI (not recommended)
2.) You can run a StoryTeller test from within an NUnit/xUnit/mbUnit test

Something like this:




using System.Diagnostics;
using NUnit.Framework;
using StoryTeller.Execution;

namespace StoryTellerTestHarness
{
    [TestFixture, Explicit]
    public class Template
    {
        private ProjectTestRunner runner;

        [TestFixtureSetUp]
        public void SetupRunner()
        {
            runner = new ProjectTestRunner(@"C:\git\blue\source\DovetailCRM.ScreenTesting\RuleTests.xml");
        }

        [Test]
        public void Create_New_Cases()
        {
            runner.RunAndAssertTest("Cases/Create New Cases");
        }

        [TestFixtureTearDown]
        public void TeardownRunner()
        {
            runner.Dispose();
        }
    }
}





 
Jeremy D. Miller
The Shade Tree Developer
jeremy...@yahoo.com



From: Winder <guilla...@gmail.com>
To: StoryTeller Users <storyteller-...@googlegroups.com>
Sent: Mon, October 3, 2011 2:00:44 PM
Subject: Can a test be debugged using StoryTeller ?

Winder

unread,
Oct 3, 2011, 3:27:06 PM10/3/11
to StoryTeller Users
I like the nUnit approach, quick and efficient to get the job done.
I just tested and it works like a charm.


Thanks for the quick reply! :)



On 3 oct, 15:08, "Jeremy D. Miller" <jeremydmil...@yahoo.com> wrote:
> Yup, you can either:
>
> 1.) attach a debugger to the UI (not recommended)
> 2.) You can run a StoryTeller test from within an NUnit/xUnit/mbUnit test
>
> Something like this:
>
> using System.Diagnostics;
> using NUnit.Framework;
> using StoryTeller.Execution;
>
> namespace StoryTellerTestHarness
> {
>     [TestFixture, Explicit]
>     public class Template
>     {
>         private ProjectTestRunner runner;
>
>         [TestFixtureSetUp]
>         public void SetupRunner()
>         {
>             runner = new
> ProjectTestRunner(@"C:\git\blue\source\DovetailCRM.ScreenTesting\RuleTests. xml");
>
>         }
>
>         [Test]
>         public void Create_New_Cases()
>         {
>             runner.RunAndAssertTest("Cases/Create New Cases");
>         }
>
>         [TestFixtureTearDown]
>         public void TeardownRunner()
>         {
>             runner.Dispose();
>         }
>     }
>
> }
>
>  Jeremy D. Miller
> The Shade Tree Developer
> jeremydmil...@yahoo.com
>
> ________________________________
> From: Winder <guillaume5...@gmail.com>
Reply all
Reply to author
Forward
0 new messages