Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7691269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:35:02+00:00 2026-05-31T20:35:02+00:00

I learned basics of web-based integration testing using SpecFlow and WatiN. From what I

  • 0

I learned basics of web-based integration testing using SpecFlow and WatiN. From what I understand, SpecFlow decides whether test has passed based on whether a specific HTML markup is present on the page – buttons, links, etc.
But doesn’t that mean that my integration tests are tightly coupled to my UI? For example, if in feature ABC Watin looks for a specific HTML element to be present (let’s say it’s a table), and I suddenly change my UI so that this table becomes a bunch of divs, WatiN won’t be able to find it and my test for feature ABC will fail. How can I avoid such situations?
My suggestions are –
a) I should write WatiN tests so that they are minimally affected by changes to UI design
b) I should make UI design so that WatiN still understands it if I change it
c) I should use some library with WatiN that is able to recognize UI design changes
Any suggestions? Where am I wrong?
EDIT
I’m an idiot – I forgot to mention I’m using ASP.NET MVC

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:35:03+00:00Added an answer on May 31, 2026 at 8:35 pm

    First you should decide if you really need to go through the UI. Probably and especially if you want to convince a stakeholder that these specs actually are exercising the system. But later on you might want to hit the system on the domain layer or right under the UI (the controller in a MVC architecture for example).

    You might even want to be able to switch between the two versions

    Either way you want to abstract away from having a tight coupling between your step definitions and the actual application (be it the page or the controller).

    One way to accomplish this is to use the Page object pattern which basically is an wrapper class for the page you’re testing. This class gives you a nice interface to interact with the page (for example a method for submitting a form, properties for fill out the form and other properties to query the page for content).

    How you actually interact with, or automate, the page is “hidden” within the page object and only need to change this one place if (when?:)) it changes.

    This is not perfect of course, you still have a “tight” coupling to the page, but is now abstracted away in a separate class and that is at least a little better.

    A tip is to try to keep you step definitions short. Super short – a single statement or row. And the move the rest of the logic down into an automation layer.

    Also don’t miss this great presentation by Matt Wynne that shows this in great effect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have learned basics of ExtJS and developed some web apps using ExtJS. Now
I learned the basics of web design a few months back and am trying
I learned to use "exists" instead of "in". BAD select * from table where
I have learned basics of Java but want to practice more. I was looking
I always coded console applications and learned some basic UML/patterns skills, using C++. Now
I have a C# Web App (Using ASP.NET 2.0) and I want to use
I've learned asp.net from books available on the internet, but I didn't find a
I just learned the basics of c++ and c#,just the simple basics of the
I'm still a C++ newbie who has only recently learned some file manipulation. I
I'm web developer. I'm using PHP! I don't know how many years of experience

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.