We have Silverlight Application and Want to Test End to End Test Automation?
I have following:-
Telerik Testing Framework.
Silverlight Application running on Browser.
VS 2012 and NUnit framework.
Could you please provide example or Jing video is really helpful.
6 Answers, 1 is accepted
We haven't worked with SpecFlow before and wanted to put together a sample project demonstrating how you can use our Telerik Testing Framework with SpecFlow. Unfortunately we don't have any online documentation on it. In theory it should follow the same basic methodology as using Telerik Testing Framework along with NUnit.
Since we, Telerik, haven't worked with SpecFlow we're unable to give you any guidance. Can you give more details on "unless you add specific code you will receive an error: with browser which I run into currently"? Please share with us what this error is. Am I correct in assuming you added some code to overcome this? Would you share with us this code?
Once I have this information, I can log a problem report that we can look into. I can't promise any ETA since this is a third party tool. It's a feature request at this point.
I haven't gotten everything working together to the degree I want yet, but I've solved some of the initial issues I found.
My goals were:
- Permit having more than one class defining the SpecFlow steps to keep code organized
- Share steps wherever useful without rewriting them in multiple step implementation classes or making an artificial inheritance structure for sharing
SpecFlow doesn't really organize step implementations. All steps marked with attributes are put into a big pool that it searches for the implementation of the step. That means you cannot have the same step name defined in multiple classes, and that you can mix steps defined in multiple classes in a Specification. Because of that you want to avoid instance or class variables between steps, but use the SpecFlow context to store any data that needs to be passed between steps.
WebAii is easiest to use when inheriting from the BaseTest class. The problem is that the WebAii objects like manager and browser are instance variables and will not be shared between different classes defining steps. To get around this, I made my own base test class inheriting from BaseTest, and making my own versions of the WebAii objects that retrieve the object from the SpecFlow context if available, otherwise go to the base (and make sure the context is set with the base version). This lets the first BaseTest subclass instance set up the objects, and the other steps use the browser, manager, etc that are already created.
Here's an example of what I'm talking about, with a couple helpers I found useful. I have several step definition classes descended from my base that have implementations of steps that use the browser, etc. I separated some concerns in a data test support class, using SpecFlow context injection as well, but that could be taken further. It does show how you can use some SpecFlow hooks carefully to clean up data.
And a simple example subclass:
Hi Cody, Can you provide a brief tutorial on how to implement specflow on Telerik framework, anytime I installed the specflow nuget or add a feature file to my project it stops working until the feature file is remove or the nuget package is removed vice verse.
I will appreciate if you can demonstrate how to implement specflow on a telerik framework.
As Cody mentioned bellow we, Telerik, haven't worked with SpecFlow we're unable to give you any guidance.
Could you please give us more detailed information no your scenario so we can try to help you out.