I'm starting to learn acceptance testing, and I want to test an ASP.NET MVC app using SpecFlow. Currently I'm writing tests for CRUD scenario
I know it's a completely noobie question, but is it practical to test every edge case in my SpecFlow scenarios? I have a form to fill, it has about 15 fields, do I need to test that, for example, "if field A is valid and field B is not, I should see this validation message on the screen"? Or it should be sufficient to write "if form is correctly filled, I should see "Task added" message"? Should I unit-test model validation separately in this case?
Thanks ahead
Is it practical to test every edge case when defining a spec for a form entry feature?
263 Views Asked by chester89 At
1
There are 1 best solutions below
Related Questions in ASP.NET-MVC
- Can MVC.NET prevent SQL-injection at razor or controller level?
- Getting and passing MVC Model data to AngularJS controller
- Access property of an object of type [Model] in JQuery
- Entity Framework Code First with Fluent API Concurrency `DbUpdateConcurrencyException` Not Raising
- Bundling and minification issue in MVC
- ASP-MVC Code-first migrations checkbox not active
- Why does Azure CloudConfigurationManager.GetSetting return null
- Dynamic roles list in CustomAuthorize ASP MVC
- Jquery: Change contents of <select> tag dynamically
- Why web API return 404 when deploy to IIS
- MVC route URL not containing parameter
- Invalidate user credentials when password changes
- MVC : Insert data to two tables
- MVC - Only allow users to edit their own data
- Submit Button on Razor View doesn't call Action Result - MVC
Related Questions in VALIDATION
- Escape dot in jquery validate plugin
- PHP form validation: Where to plop the code
- i want to create a service that does the login functionality?
- Stray start tag head, Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)
- Html File Input on Chrome for Android missing extension and mime type
- javascript check input fields are not blank and check input field length?
- Symfony 2 form - date widget and validator
- Bean Validation message interpolation with array constraint parameter used as variable in message
- Bash regular expression execution hangs on long expressions
- Accessing the main object in a javax.validation.ConstraintValidator
- RAILS: date_select validation
- How can I define items of an array in a form in AngularJS
- Validation DataGridView Windows Forms
- How to handle multiple if statements PHP
- Restrict comma in asp.net textbox
Related Questions in BDD
- Behat doesn't load extensions?
- How can i keep my database clean between my scenarios?
- How do I test array element types using BDD Javascript?
- Is there a way to create a custom cucumber formatter that prints the Given, When and Then steps
- Behat / Mink error Snippets for the following steps not generated
- Unit Test Adapter threw exception: Object must implement IConvertible..in BDD specflow framework
- Instantiating PageObject instances from within Cucumber StepDefinitions
- SpecFlow Ambiguity in bindings
- Socket.IO server not receiving message from client
- In “Given-When-Then” style BDD tests, is it OK to have multiple “When”s conjoined with an “And”?
- How can we validate tabular data in robot framework?
- Simple Spec That Validates_Associated
- Providing Examples in more than 1 row Specflow
- Cucumber Testing, Counting Page Elements
- .settings not working 'mocha' in Microsoft Visual Studio Code on Windows
Related Questions in SPECFLOW
- Clean Up after Canceling tests
- How to make step argument dependent on configuration?
- Specflow Testing
- SpecFlow Table.CreateInstance returns null
- Specflow Given When Then BUT?
- SpecFlow and Selenium-Share data between different step definitions or classes
- Why are my tests failing when run on the build server?
- SpecFlow Ambiguity in bindings
- Multiple Scope value in Binding (Specflow)
- SpecFlow - Execute ScenarioOutline from Visual Studio Context Menu
- Providing Examples in more than 1 row Specflow
- parallel execution in nunit for bdd test cases
- Passing arrays of variable in specflow
- Specflow/Gherkin: How to handle bad data
- Repeat scenarios for different examples
Related Questions in ACCEPTANCE-TESTING
- What's the meaning of page and page.body in Capybara
- Quickly copy big MySQL database for testing
- Where should I put test classes if they ARE the project?
- Visiting multiple links on a page. [codeception]
- change env when acceptance testing laravel app with codeception and selenium
- Check for 404 in codeception
- How to Test View in Winforms
- Ember 2, acceptance testing, websocket pending hangs andThen() wating for pending to finish
- Is Geb(automation testing framework) a good acceptance testing framework?
- How can I simulate a swipe gesture programmatically?
- Should API REST BDD Cucumbers Gherkins include specific details about an API or data
- What is the proper way to test a system using Akka and RabbitMQ?
- Is there a way to do an "if I see, then…" with webdriver acceptance testing?
- Fitnesse in Cruisecontrol.net exec: do not fail the build when tests fail
- Capybara-webkit raises Capybara::Driver::Webkit::WebkitInvalidResponseError
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I tend to look for higher-level behavior in scenarios or acceptance tests than I do with unit tests. Particularly, I'm looking for behavior that's valuable to users or other stakeholders.
In this case, the high-level behavior might be phrased as "the user gets feedback on how to fill in the form". You can then just use one or two examples of how the user gets that feedback, and check that the validation message appears.
You can then put the logic around the specific messages in a unit test.
Acceptance tests, especially if you're using BDD scenarios, aren't really tests. They're examples of how to use the system so that you can use those examples to drive conversation with your business stakeholders, and I would tend to phrase them in the same granularity and terms that the business stakeholder is interested in. BDD isn't a substitute for manual testing, though it can certainly help to reduce the burden.