How do you get StoryTest to work? - tdd

Does StoryTest (http://storytestiq.solutionsiq.com/wiki/Main_Page) work? Everything on the wiki is under construction.
If you have gotten it to work, can you share how you did it?

While StoryTest appears to be a very cool approach to managing Selenium and FitNesse type tests, there has been no activity on that project in a year. I would chalk it up to abandoned.
I would consider using Selenium with SpecFlow to achieve a similar result that could be run from your continuous integration server.
Selenium
SpecFlow
Steven Sanderson has an awesome article on his blog about using SpecFlow with WatiN, his technique should be in the neighborhood of what you are attempting to accomplish.
http://blog.stevensanderson.com/2010/03/03/behavior-driven-development-bdd-with-specflow-and-aspnet-mvc/

Related

Using Theory and ClassData to Parametrize Xamarin UITests

I'm currently trying to make UI-Tests in Xamarin, where i want the app to be tested against different server versions.
Originally i wanted to do this like i did in unit-tests with parametrized tests by using [Theory] and [ClassData].
Unfortunately i haven't found anything about this in the web so far regarding this nUnit construct.
Is this even possible? or is there another way to tell my xamarin UI-Test to run all my tests once for each server version?.
Many thanks in advance.
Mav
Soo, the mistake i made was to assume that i could use xunit blocks for nunit tests.
My bad.
The solution is pretty simple and can be looked up here in the gitHub projects documentation:
https://github.com/nunit/docs/wiki/TestFixtureData

One test suite for functional and performance test

I have been playing around watir-webdriver-performance gem of late and I am quiet interested to test the functionality and performance of the website using single test suite.
Thanks to Alister Scott for this
Now I want to include this into my env.rb file and run after each scenario.
Any inputs in this regards would be of great help.

Browser Tests using Coded UI

How do I write the following tests which is written in Watin using CodedUI
I am trying to learn CodedUI but really struggling
[Test]
public void SearchForWatiNOnGoogle()
{
using (var browser = new IE("http://www.google.com"))
{
browser.TextField(Find.ByName("q")).TypeText("WatiN");
browser.Button(Find.ByName("btnG")).Click();
Assert.IsTrue(browser.ContainsText("WatiN"));
}
}
You might find a bit of help from one of these links:
http://blogs.msdn.com/b/gautamg/archive/2009/12/18/why-is-coded-ui-test-generated-code-not-a-straight-line-code.aspx - this is a blog post on MSDN that talks about the code generated by recording a test. It has a sample project attached you might consider looking at.
As I said in your other question, the best way is to create recordings. There is a nice little walkthrough also on MSDN, here: http://msdn.microsoft.com/en-us/library/ff977233.aspx. This one shows you the process of recording a test and generating and maintaining the code for it.
I would strongly encourage you to thoroughly read those two articles.
WatiN and the Visual Studio Coded UI tests are different. 'Coded UI tests' refer to Visual Studio's own UI testing tools. WatiN is a different test framework.
Personally, I don't like WatiN because it takes a long time to write tests and it does not playback tests reliably (at least from my experience). The Visual Studio Coded UI tests I prefer more because they provide a test recorder which auto-generates the test code and a a graphical test editor, while still giving you the flexibility to edit the test code yourself.
I have found more success with Visual Studio coded UI tests. The best thing you can do to get started with creating tests using VS Coded UI tests is to read the MSDN documentation, particularly be sure to read the 'Anatomy of a Coded UI Test' to get a hang for the generated code. Read each article in the documentation as it goes through the whole process, from recording tests to editing, maintaining them and best practices.
Also, make sure you have downloaded Visual Studio Feature Pack 2 to be able to use the graphical test editor which is useful when creating and editing tests.
The really off-putting thing about WatiN (apart from its unreliability) is that it doesn't really have a proper documentation, so it can be difficult to know how to handle elements. It's my opinion that you should ditch WatiN, and go with the Visual Studio coded UI tests, if they are available to you. The great thing about the Visual Studio coded UI tests is that it can deal with minor changes to the UI and automatically adapts. WatiN can do no such thing.

What are some good example open source Ruby projects that use Cucumber and RSpec well?

What are some good example open source Ruby projects that use Cucumber and RSpec well?
Update: While the suggestions below where quite impressive, I wanted to see how others are using RSpec and Cucumber to drive product development.
From Quora:
Teng Siong Ong, Ruby, Python, etc.
https://github.com/teambox/teambox
I find it really nice that the RSpec project is tested with both Cucumber and RSpec itself:
https://github.com/rspec/rspec-core/tree/master/features
https://github.com/rspec/rspec-core/tree/master/spec
Cucumber is also self-hosted test-wise:
https://github.com/aslakhellesoy/cucumber/tree/master/features
I've also found it very useful that Aruba, a library of steps for testing CLI apps with Cucumber, is itself tested with Cucumber:
https://github.com/aslakhellesoy/aruba/tree/master/features
RubySpec is a rather ambitious effort to write specs for the Ruby language.

Unit Testing a Firefox Addon

In working on a firefox addon, i've found the task of unit testing to be kinda janky and difficult to setup. Anyone have recommendations on how to setup unit tests for an addon? Any tools or additional addons found to be helpful?
I've found Mozmill [ https://addons.mozilla.org/en-US/firefox/addon/9018 ], which I think will be useful to an extent, but it's more of a high level tool and i'm looking for a tool or approach that works for more low level testing.
How about UxU ( https://addons.mozilla.org/en-US/firefox/addon/6357 ) ?
I used code-level unit testing with Mozmill. I "hooked" resource:// path of Mozmill by programmatically adding testing add-on (Urim) path to it in test initialization (setupModule function). As the result i can test any peace of code of my testing add-on like it is own code of Mozmill. Look here for an example. As i understand, this is you are looking for.
The new JetPack Add-On SDK they are working on for Firefox 4.0 has testing built in. It isn't documented yet though, but it's something to watch. It looks like you run "cfx test" which will run the tests.
Some links:
JetPack - https://jetpack.mozillalabs.com/
Add-On SDK Documentation - https://jetpack.mozillalabs.com/sdk/1.0b2/docs/
Add-On SDK Test Harness - https://builder.addons.mozilla.org/api/test-harness
Also see http://paulgu.com/wiki/Unit_Testing_Framework. I haven't used it, but it seems like a simpler and lighter-weight approach that might be easier to integrate. I think it could be better packaged to make it easier to add to an existing extension, but that is probably a straightforward refactoring.
WebDriver or Selenium?

Resources