Tag Info

Hot answers tagged

11

Ideally, the DoD for each user story should mean all tests for that user story are passing, and all automation is completed, running as part of the overall automation (as opposed to on one person's machine), and running with no errors. Real world usually means compromises, since there's rarely enough time or resource to cover all the potential implications ...


7

I read two questions: (1) should we document the tester-written unit tests and (2) how should we treat tests that assume implementation details? It's important to distinguish between scaffolding and unit tests. (Please don't get caught up in my terminology; I'm just trying to make a point about some concepts.) Scaffolding is code a developer writes as ...


7

Your testers deliver the tests scenarios that should be implemented by the developers and some of your developers write more tests than required. Give them a raise! I recommend to review the extra tests and check if they make sense. Encourage all developers to write more tests to put their knowledge into tests. They know implementation details, so they can ...


6

I don't see why it wouldn't scale. It's conceptually simple (which naturally makes it self open to scalability.) I would be weary though - the more complex a test is, the less effective it is. If you have tests you're worried about being too complex "Given, When, Then" (I almost abbreviated that to GWT but realized that would confuse people haha. Ahem...) ...


5

I agree that your tests will require ongoing maintenance (as does most test automation). There are tactics for organizing your Selenium tests so that maintenance is easier, but they depend upon how the user interface is written, whether the developers help maintain the tests, and the manner in which the user interface changes. In fact, the quicker the user ...


5

The elephant in the room: maintenance. How do we maintain this new feature: what things need to be configurable? can we easily roll this out (what's the roll out?)? what support tools do we need to resolve issues with this in production quickly? I worry that one day all of humanity will be maintining code of our forefathers... think of the children!


5

Although I don't have any experience using SpecFlow, I've recently starting using StoryQ for this type of testing. Although I was very leary on it at first, I've found it to be very useful, including in complex scenario's. Not only is the code more organized now, but also, I've found it easier to write more complex scenario's as it forces me to break it up ...


4

In the company I'm currently working on, we tested out some testing frameworks out there, and we finally decided to go with Jasmine. This is what we found: JsUnit: This is one of the oldest unit testing framework, that was later being maintained by Pivotal Labs. But even they are using Jasmine now :P. JSpec: This is an RSpec like BDD unit testing ...


4

There are several useful heuristics for stopping testing. A few I can think of 'No more time' - i.e. we stop due to a business imposed deadline. Have you come to understand what you set out to understand about the feature (you do set specific goals for test sessions right?) Mission critical bug unearthed at which point documenting and fixing the bug ...


3

Cel, As always, it depends. If there's a requirement that the link contain a label then obviously the test needs to check that a label exists (whether automated or not). Here are some of the possible things I'd consider with this scenario: Is the code dynamically generated or static? For a static "once and done" page, the mark 1 human eyeball might be ...


3

You certainly can. Both WebClient, or HttpRequest would work well as the 'glue' for this scenario. Note that I'd probably rephrase your Given/When/Then Statement as something like: Given the logon page at http://someurl/account/logon When I post with parameters username='test' and password='123' Then I am redirected to http://someurl/home


3

Another thought to add to the well-written answers: In the question, the author mentions a developer's objection: adopting the Selenium tests to changes (like a changed button_id or something) would take too long. Since UI tests are brittle with respect to the underlying structure of the UI, UI automation success depends on successful collaboration ...


3

My definition of done is generally "we don't have to worry about (e.g. touch, test, do ANYTHING with) that feature again in order to release the code. One of the better discussions I've seen on this is this presentation last year by Ken Schwaber at a Canadian company called Pyxis, it's up on U-tube in three parts, the first part is here


3

In the traditional sense of the word a unit test is designed to test the smalled functional unit of software such as s single method or function. Unit tests are intended to provide limited testing of the functional capabilities of a function or method in isolation. Typically, unit tests are written and maintained by developers because they should be used by ...


3

Jasmine is a BDD tool for JavaScript.


3

From a pure technical design viewpoint, a single solution would most likely be better. This is a case where the real answer depends on what the impact is if you run your "Test" tests in production. For example, if you are testing Facebook and creating new test account from scratch and then modifying it, then you could probably run all your tests in every ...


3

Whenever possible I try to have the same solution for testing in my test environments as in my production environments. It isn't always possible, but when it is there are many benefits of this approach: You are sure the tests are the same, so all the time you have put into updating, maintaining and improving those tests for your test environment also gets ...


3

Firstly, I think you used the word "anger" when you meant "earnest" - but this is purely a guess on my part. If my guess is correct (a "big" IF), then to answer your question, I would say "yes" - in other words, I would use "given" "when" "then" for more complex scenarios.


2

You can create mock response files of that web service and use them during development of your site. I assume that general structure of web service response is already established.


2

I could be off my footing here (and if I am, please let me know!), but from a QA perspective, everything that TDD is for automated tests, BDD is for manual tests. Now some of these 'manual tests' may indeed be automated, but only insofar as they're pretending to be a user. They aren't like unit tests. Just because you have dedicated people doing the testing ...


2

Some of your developpers are probably doing a combined BDD/TDD approach as described in MSDN Magazine: BDD Primer - Behavior-Driven Development with SpecFlow and WatiN. I see unittests as a kind of executable documentation that fail if the documentation (=testcode) or the some productioncode (that is called by the testcode) is wrong. Do you consider ...


2

The insertion of Thread.Sleep() is typically indicative of a race condition in your test and your test is running out of sync with the thing is it testing. One suggestion may be to insert a polling loop to wait for the redirect, or an event to indicate the redirect has happened. See http://www.testingmentor.com/imtesty/?p=652 and read the comments for ...


2

I dont really have time to form an opinion of my own, but here's one from Michael Bolton, whose opinion I value & trust. It may help you to make up your mind...


2

To make this change for "As an admin" you will need to change the code that is generated in specflow. This would be the best place for this change IMHO. As Lyndon suggests, the code that I have written for WatiN should work, but it really depends on how the application is developed. My other answer copied below. What I found to solve the "run test as user ...


1

Specflow and Fitnesse approach the process of testing in two different ways. The process of passing inputs into your tests is very much a way of exploring the functionality of what the system can do. BDD however is all about defining scenarios that define exactly what the system should do. As a result, I would susggest the execution pattern for these ...


1

A lot of your question talks about the tools, Jira, source control, etc. I think you are letting the process that the tools facilitate is guiding your thinking too much. If you read Liz Keogh, she repeatedly talks about the conversation that you need to have in order to fully define and form your ideas about the feature that you are developing. I think ...


1

Although I haven't had a chance to try it in this particular circumstance, you could try the answer that I received to a similar question. If it is just as simple as logging in as the admin, I would first ensure that you can log in as an admin, add that code to your setUp, and then do a verification in the Given


1

Let me take BDD out of the equation for a moment and answer your question about what the recommended scenarios are for Selenium automation. I have found that there are 2 primary areas that UI automation should focus on to have the best ROI: The first is UI specific functionality, for instance anything that is driven by javascript on the page (including ...


1

You can use Given/When/Then for scenarios with any complicity level, for instance, Very specific scenario: Scenario: Error when the password and confirm password do not match Given I am on User Registration From When I fill the Form fields as follow: | Field | Value | | Name | myusrname| | Password| password123| |Confirm Password | ...


1

I agree with Phil completely when he says that it doesn't sound as though you are using BDD/TDD in your project. This would typically include tests written by the developer, either before or immediately after the code was written. I can also understand part of the uncertainty on the part of the developers. I've had the argument with many of my developers ...



Only top voted, non community-wiki answers of a minimum length are eligible