﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on Actual scenario testing with Raven</title><description>Jay,
  
I wasn't actually aware that there WAS a fiddler core :-(
  
I unzipped the files manually, read the stored values and acted upon them, nothing smart or anything like it, I am afraid.
</description><link>http://ayende.com/4423/actual-scenario-testing-with-raven#comment8</link><guid>http://ayende.com/4423/actual-scenario-testing-with-raven#comment8</guid><pubDate>Fri, 12 Mar 2010 08:08:04 GMT</pubDate></item><item><title>Jay Walker commented on Actual scenario testing with Raven</title><description>Ayende,
  
i'm interested in how you are parsing the .saz (zip) file. FiddlerCore doesn't include this ability. I'm interested if you are unzipping and then using FiddlerCore. I'd like to take advantage of some Fiddler functions to give timing information across a graph of requests (html + associated images for instance). 
  
  
&gt;Scenario.Execute is fairly involved, it parse the Fiddler’s saz file, build appropriate request and compare to the expect response, it is also smart enough to handle changing things like ETags and pass them along.
  
</description><link>http://ayende.com/4423/actual-scenario-testing-with-raven#comment7</link><guid>http://ayende.com/4423/actual-scenario-testing-with-raven#comment7</guid><pubDate>Thu, 11 Mar 2010 21:20:47 GMT</pubDate></item><item><title>Imran commented on Actual scenario testing with Raven</title><description>yeh just realised that you don't actually have have a web form. I saw 'get' methods and assumed this.
</description><link>http://ayende.com/4423/actual-scenario-testing-with-raven#comment6</link><guid>http://ayende.com/4423/actual-scenario-testing-with-raven#comment6</guid><pubDate>Fri, 05 Mar 2010 12:37:11 GMT</pubDate></item><item><title>Ayende Rahien commented on Actual scenario testing with Raven</title><description>Imran,
  
No, I could not.
  
Different purposes all together
</description><link>http://ayende.com/4423/actual-scenario-testing-with-raven#comment5</link><guid>http://ayende.com/4423/actual-scenario-testing-with-raven#comment5</guid><pubDate>Fri, 05 Mar 2010 10:35:20 GMT</pubDate></item><item><title>Imran commented on Actual scenario testing with Raven</title><description>You could also use something like watiN 
[http://watin.sourceforge.net/](http://watin.sourceforge.net/).
</description><link>http://ayende.com/4423/actual-scenario-testing-with-raven#comment4</link><guid>http://ayende.com/4423/actual-scenario-testing-with-raven#comment4</guid><pubDate>Fri, 05 Mar 2010 10:32:24 GMT</pubDate></item><item><title>Ayende Rahien commented on Actual scenario testing with Raven</title><description>Andrey,
  
Because I want an easy way to be able to debug a single scenario, rather than executing all of them in one shot.
</description><link>http://ayende.com/4423/actual-scenario-testing-with-raven#comment3</link><guid>http://ayende.com/4423/actual-scenario-testing-with-raven#comment3</guid><pubDate>Fri, 05 Mar 2010 07:54:27 GMT</pubDate></item><item><title>Andrey Shchekin commented on Actual scenario testing with Raven</title><description>Nice. Seems very similar to RowTests/Factories people did with MbUnit a lot of time ago. I wouldn't say this approach is specific to scenarios, with other kinds of data in files it can be used for unit-testing as well.
  
  
Btw why "running in VS" hack is required? I generally just put required files into embedded resources.
</description><link>http://ayende.com/4423/actual-scenario-testing-with-raven#comment2</link><guid>http://ayende.com/4423/actual-scenario-testing-with-raven#comment2</guid><pubDate>Fri, 05 Mar 2010 06:50:58 GMT</pubDate></item><item><title>Ajai Shankar commented on Actual scenario testing with Raven</title><description>I think I've also had some success with the scenario based approach (state black box)
  
  
We had complex mortgage lead distribution rules which were nicely captured in a scenario xml file.
  
  
Even built a simple Scenario UI where we could set up current and expected state after the distribution code ran.
  
  
My MBUnit test looked like this:
  
  
DataSet data; // my mock DB without NH :-)
  
  
[Factory]
  
public string[] ScenarioFile() 
  
{
  
   string dir = ConfigurationSettings.AppSettings[SCENARIO_DIR];
  
   return Directory.GetFiles(dir, "*.xml");
  
}
  
  
[CombinatorialTest]
  
public void TestOneScenario([UsingFactories("ScenarioFile")] string scenarioFile) 
  
{
  
   data.Clear();
  
   data.ReadXml(scenarioFile, XmlReadMode.IgnoreSchema);
  
  
   LeadDistributorMock mock = new LeadDistributorMock(DB, data);
  
   Assert.IsTrue(mock.RunAndVerifyDistribution());
  
}
  
  
And some files were:
  
  
DailyMax.xml
  
DistributionGroupPriority.xml
  
FreeLead_AggregatorPricing.xml
  
FreeLead_IOBudget.xml
  
  
  
</description><link>http://ayende.com/4423/actual-scenario-testing-with-raven#comment1</link><guid>http://ayende.com/4423/actual-scenario-testing-with-raven#comment1</guid><pubDate>Fri, 05 Mar 2010 01:18:16 GMT</pubDate></item></channel></rss>