Do we need more of an automation analyst's time in BDD than we would need in a non-BDD project? - bdd

I am new to BDD and willing to follow BDD methodology for my test Automation projects. Do we need more of an automation analyst's time in BDD than we would need in a non-BDD project?

The term BDD means behaviour driven development. It means development (not testing) derives from behaviour and that behaviour would be the acceptance criteria.
You can use the same scripts (Gherkin syntax ) for test automation but you need other tools as well (like selenium, WebUI etc.) to do actual test automation (For developer automation they can use the same business logic they have written to invoke from BDD scripts). So if an automation tester uses BDD then only thing they can do there is to create automation test scripts (in Gherkin syntax) and generate skeleton of the behaviour then to integrate with automation test frameworks. BDD is not the replacement of testing frameworks like selenium, QTP etc. Effort wise there will not be much difference (If you know test automation already) if you use BDD (Gherkin syntax) for your automation. One or the other place you have to write test scripts. If it is BDD then that will be Gherkin syntax in a file.

Related

Capybara/Selenium vs Robot Framework for Rails

I have decided to choose Rspec/Capybara over Robot Framework for integration tests in Rails based App.
Previously, Robot Framework was used for integration testing in the project I am working on. As I now joined the team so I am trying to change it to Rspec-based integration testing using Capybara but I have to convince the top management that Rspec and Capybara is better option for Rails based application.
So basically I need a comparison table between these two frameworks which will tell that Rspec is better option than Python Robot Framework (if it is a better option).
After lot of research I was able to compile following comparison table between Rspec/Capybara vs Robot Framework
I am answering this question in case somebody else need it.

How to do ASP.NET MVC Integration testing using selenium

I need to know is it possible to perform integration testing using selenium for ASP.NET MVC applications. If yes then What are the requirements and how to do it. Will it be an external application to test from UI or should I be using views. Really confused. Please guide
If you are planning to write the Selenium tests using C#, which I'd recommend over using any kind of test recorder, then this will be a separate project.
You will run this and it will test a deployed version of your application, ideally in a dedicated test environment. There is extensive documentation available.
Personally I and others prefer WatiN for testing web applications using C# written tests.
Selenium can be used for testing any web applications include ASP.NET MVC. In general, you add test project to solution and write tests in it. Selenium open browser and execute commands that is described in your test. You can write test in c# or can use recorder and save record as c# test.

What tools are available for calculating code coverage using browser automation tests

I have a website written in ASP.NET MVC 3. I have put together some browser automation tests that target this website. I want to use this same set of tests to calculate the code coverage of the website code.
I know that NCover does this kind of work but based on my knowledge there are two issues. One, NCover gives code coverage figures for both framework's code and my code. Two, it's costly.
NCover has filters that you can use to ignore the framework code.
You could also use OpenCover or PartCover to get these metrics and they are both open source and free - they also have filters.
Hooking them into IIS is tricky but if it is for automation tests then you can run your tests against IIS express - much easier.

ASP.NET MVC Unit Test

I'd like to try unit test in ASP.NET MVC framework. But I don't know which unit test framework I have to choose.
NUnit, xUnit.net, MbUnit. or the unit test framework included with Visual Studio, which one is better?
If you are interested in following BDD guidelines, I highly recommend xUnit.NET with Moq as the mocking framework. The two are some of the most forward looking and modern unit testing frameworks available these days, and combined they make both a powerful and flexible unit testing platform. xUnit.NET is extremely extensible as its Fact and Trait attributes can be extended with your own attributes, and the testing frameworks behavior can be changed to suit your needs.
A great example of this flexibility is the ObservationAttribute and supporting framework to allow BDD style testing with xunit.net, found here:
http://iridescence.no/post/Extending-xUnit-with-a-Custom-ObservationAttribute-for-BDD-Style-Testing.aspx
I use the above BDD-style testing to create Test-Class-Per-Unit style BDD tests for my ASP.NET MVC controllers (well, and everything else I unit test, too.)
ASP.Net MVC doesn't make any specific demands of a framework, any will work just fine. NUnit is the most widely used, and for that reason it is my default choice.
Once you get into unit testing, some of the other frameworks offer different advanced features that you may like to check out.
I don't know anyone using the MS unit testing framework.
I would recommend to start from xUnit if your have not used any testing framework before. It's hard to decide which framework is better but I think that xUnit is the "most modern" among NUnit, MbUnit and MSTest. Start learning xUnit from this article and then this
I am using MSTest :) so now you know one ;)
Seriously, I think that MSTest is a the best framework for the start with TDD.
It is liteweight and it is generating all that you need for the wrapup and the most important thing, it is integrated in the visual studio...so, why don't you start with mstest and later on you can switch to advanced frameworks with no problems.
So in short, I would recomend a MSTest.
cheers

Functional test software/framework that covers Asp.Net Web Apps?

I recently began to use the NexusLight, a functional test automation framework.
Are there more frameworks that does a similar job?
Related question: End-to-End application testing from a users standpoint
I haven't really looked into NexusLight but I think InCisif.net is supposed to provide a functional test framework as well. You could look into it.
I test asp.net web apps for years and the only tool I use is Watir.
VSTT 2010 should be a good bet if you are looking for functional test automation. Web Services Testing, UI testing, Biztalk testing and Data Driven Testing Support. Please look at VSTT - http://msdn.microsoft.com/en-us/library/ee338734(v=vs.90).aspx
You can also try VSTT - http://blogs.msdn.com/b/slumley/archive/2009/05/28/vsts-2010-feature-enhancements-for-web-test-playback-ui.aspx
Telerik Test Tools - http://www.telerik.com/automated-testing-tools.aspx
Visual Studio UI Test Extensibility–Scenarios & Guiding Principles - http://blogs.msdn.com/b/mathew_aniyan/archive/2011/03/28/visual-studio-ui-test-extensibility-scenarios-amp-guiding-principles.aspx
VSTS Web Test Step-by-Step Primer - http://blogs.msdn.com/b/jimmymay/archive/2009/02/23/vsts-web-test-step-by-step-primer-7-minute-video-by-microsoft-a-c-e-performance-engineer-chris-lundquist-with-copious-notes-screen-shots-from-your-humble-correspondent.aspx
Found this one too:
http://www.automatedqa.com/products/testcomplete/index.asp
Unfortunately it's not free.
Reading a list made by Scott Hanselman, I found these two tools:
WatiN, to automated the tests;
WatiN Test Recorder, to automate the test code generation.
From WatiN page:
[...]WatiN (pronounced as What-in) website. Inspired by Watir development of WatiN started in December 2005 to make a similar kind of Web Application Testing possible for the .Net languages.
And from WatiN Test Recorder:
The purpose of the application is to generate code compatible with the WatiN (Web Application Testing In .NET) project.
Have a look at Seleno. It uses Selenium under the bonnet but abstracts all browser automation into Page Objects, which lead to well structured and fluid C# based tests.
It is particularly well suited to ASP.NET MVC, as each Page Object can be strongly typed (using Generics) to an equivalent MVC ViewModel, leading to a consistent relationship between View, ViewModel and Page Object.
Check out some of the samples in the Seleno codebase to see this in action.

Resources