Search Results

Search found 14022 results on 561 pages for 'coded ui tests'.

Page 7/561 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Removing hard-coded values and defensive design vs YAGNI

    - by Ben Scott
    First a bit of background. I'm coding a lookup from Age - Rate. There are 7 age brackets so the lookup table is 3 columns (From|To|Rate) with 7 rows. The values rarely change - they are legislated rates (first and third columns) that have stayed the same for 3 years. I figured that the easiest way to store this table without hard-coding it is in the database in a global configuration table, as a single text value containing a CSV (so "65,69,0.05,70,74,0.06" is how the 65-69 and 70-74 tiers would be stored). Relatively easy to parse then use. Then I realised that to implement this I would have to create a new table, a repository to wrap around it, data layer tests for the repo, unit tests around the code that unflattens the CSV into the table, and tests around the lookup itself. The only benefit of all this work is avoiding hard-coding the lookup table. When talking to the users (who currently use the lookup table directly - by looking at a hard copy) the opinion is pretty much that "the rates never change." Obviously that isn't actually correct - the rates were only created three years ago and in the past things that "never change" have had a habit of changing - so for me to defensively program this I definitely shouldn't store the lookup table in the application. Except when I think YAGNI. The feature I am implementing doesn't specify that the rates will change. If the rates do change, they will still change so rarely that maintenance isn't even a consideration, and the feature isn't actually critical enough that anything would be affected if there was a delay between the rate change and the updated application. I've pretty much decided that nothing of value will be lost if I hard-code the lookup, and I'm not too concerned about my approach to this particular feature. My question is, as a professional have I properly justified that decision? Hard-coding values is bad design, but going to the trouble of removing the values from the application seems to violate the YAGNI principle. EDIT To clarify the question, I'm not concerned about the actual implementation. I'm concerned that I can either do a quick, bad thing, and justify it by saying YAGNI, or I can take a more defensive, high-effort approach, that even in the best case ultimately has low benefits. As a professional programmer does my decision to implement a design that I know is flawed simply come down to a cost/benefit analysis?

    Read the article

  • How to change Jquery UI Slider handle

    - by Tom
    I want to modify the stock JQuery UI slider so that the handle has a arrow on it rather than being a square. i.e. I want to use a custom image as the handle. There are a few tutorials that do it: http://jqueryfordesigners.com/slider-gallery/ http://www.ryancoughlin.com/2008/11/04/using-the-jquery-ui-slider/ http://www.keepthewebweird.com/creating-a-nice-slider-with-jquery-ui/ But I can't get it to work. The following code results in a stationary handle image: <!DOCTYPE html> <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.slider.js"></script> <style type="text/css"> #myhandle {position: absolute;z-index: 100;height: 25px;width: 35px;top: auto;background: url(http://stackoverflow.com/content/img/so/vote-arrow-down.png) no-repeat;} </style> <script type="text/javascript"> $(document).ready(function(){ $("#slider").slider({handle: '#myhandle'}); }); </script> </head> <body> <div id="slider"><div id="myhandle"></div></div> </body> </html> It is as if JQuery doesn't pick up that I want to use the myhandle id for the handle. I'm wondering: Do I need a plugin for JQuery to recognise the handle option? (it is not documented in http://docs.jquery.com/UI/Slider). Or perhaps it only worked in an old version of JQuery? Any ideas?

    Read the article

  • The type or namespace name 'UI' cannot be found for using System.Web.UI

    - by user284523
    I am following the tut here http://msdn.microsoft.com/en-us/library/h59db326.aspx # Create an App_Code directory directly under the root directory of your Web site (also called Web application root). # Copy the source file for the control (WelcomeLabel.cs or WelcomeLabel.vb) to the App_Code directory. But I got the error on using System.Web.UI; using System.Web.UI.WebControl; I have tried to add System.Web as Reference but that still doesn't resolve the stuff. I can't see System.Web.UI and System.Web.UI.WebControl in the reference lists is this normal ? Thanks.

    Read the article

  • jquery ui autocomplete database

    - by user343925
    Hello, I'd like to use jQuery UI autocomplete in order to load a list from my database but I don't know wich method I should use to do so. I tried to use the "Remote datasource" method [url]http://jqueryui.com/demos/autocomplete/#remote[/url], but it obviously doesn't work. I have the following code : js: $(function() { $("#client").autocomplete({ source: "nom.php", minLength: 2, select: function(event, ui) { alert(ui); } }); }); html : <label for="client">Client</label> <input name="client" id="client" class="ui-autocomplete ui-widget-content ui-corner-all" /> php: $query = "SELECT nom from personne"; $result = mysql_query($query, $db); while($row = mysql_fetch_assoc($result)) { foreach($row as $val) $tab[] = $val; } print json_encode($tab); It does work with ["hello","test1","test2"] instead of the url but I need to load datas form database so pls tell me how I should do. thank you

    Read the article

  • How to apply CSS theme to only a specific jQuery-UI element?

    - by Thierry-Dimitri Roy
    I have a web site already build with my own CSS theme. I'm using jQuery UI "tabs" widget but no CSS from jQuery-UI. Now, I'm trying to add the "Date Picker" widget in one of my page. It would be great if I could reuse jQuery-UI default theme which is just fine. The problem is that the date picker theme is also applied to my tabs CSS. For example the "ui-widget" css properties is applied to both date picker and tabs elements. I can't seem to find a way to apply the css properties to only the date picker. I can't see a "super selector" that only applies to the date picker DIV. What would be the best way to handle this? [EDIT] The datepicker widget is really the problem. I cannot apply CSS style specific to it. Here is the starting code of the DIV that get pops up: <div style="position: absolute; top: 300.4px; left: 149px; display: block;" id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"><div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all"> As such, I cannot add a super selector. What would be great would be that the date picker widget supports CSS scope. But it does not. I'm stuck manually editing the jQuery CSS file. The Date Picker is currently being refactored. Hopefully the new code will address this issue.

    Read the article

  • Changing background image on accordion change - jQuery Ui

    - by Coughlin
    I am using this code: $('.ui-accordion').bind('accordionchange', function(event, ui) { $(this).next().next().css({'background-image':'images/green-bg.jpg'}); //ui.newHeader // jQuery object, activated header //ui.oldHeader // jQuery object, previous header // ui.newContent // jQuery object, activated content // ui.oldContent // jQuery object, previous content }); To try to change the background image of the PREVIOUS header after it changes. I see that the jquery docs supply the object for oldHeader, but I am trying to change the CSS of that element. Any ideas how I would do that? So You go to the next one it goes green, then the current one is going to be red. Thanks, Ryan

    Read the article

  • jquery-ui icons

    - by cf_PhillipSenn
    I understand that if I use this: <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1"); google.load("jqueryui", "1"); </script> <span class="ui-icon ui-icon-arrowthick-1-n"></span> Then an arrow appears. I don't understand how to wrap the arrow with this: ui-state-default ui-corner-all because themeroller is using list items, and I'm using table head cells. I don't want to use: <th class="ui-state-default ui-corner-all"> because that highlights the entire cell.

    Read the article

  • Developing with Fluid UI – The Fluid Home Page

    - by Dave Bain
    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} The first place to start with Fluid UI is with the Fluid Home Page. Sometimes it’s referred to as the landing page, but it’s formally called the Fluid Home Page. It’s delivered with PeopleTools 8.54, and the nice thing about it is, it’s a component. That’s one thing you’ll discover with Fluid UI. Fluid UI is built int PeopleTools with Fluid UI. The Home Page is a component, the tiles or grouplets are group boxes, and the search and prompt pages are just pages. It makes it easy to find things, customize and brand the applications (and of course to see what’s going on) when you can open it in AppDesigner. To see what makes a component fluid, let’s start with the Fluid Home Page. It’s a component called PT_LANDINGPAGE. You can open it in AppDesigner and see what’s unique and different about Fluid UI. If you open the Component Properties dialog, you’ll see a new tab called Fluid On the Component Properties Fluid tab you’ll see the most important checkbox of all, Fluid Mode. That is the one flag that will tell PeopleSoft if the component is Fluid (responsive, dynamic layout) or classic (pixel perfect). Now that you know it’s a single flag, you know that a component can’t be both Fluid UI and Classic at the same time, it’s one or the other. There are some other interesting fields on this page. The Small Form Factor Optimized field tells us whether or not to display this on a small device (think smarphone). Header Toolbar Actions offer standard options that are set at the component level so you have complete control of the components header bar. You’ll notice that the PT_LANDINGPAGE has got some PostBuild PeopleCode. That’s to build the grouplets that are used to launch Fluid UI Pages (more about those later). Probably not a good idea to mess with that code! The next thing to look at is the Page Definition for the PT_LANDINGPAGE component. When you open the page PT_LANDINGPAGE it will look different than anything you’ve ever seen. You’re probably thinking “What’s up with all the group boxes”? That is where Fluid UI is so different. In classic PeopleSoft, you put a button, field, group, any control on a page and that’s where it shows up, no questions asked. With Fluid UI, everything is positioned relative to something else. That’s why there are so many containers (you know them as group boxes). They are UI objects that are used for dynamic positioning. The Fluid Home Page has some special behavior and special settings. The first is in the Web Profile Configuration settings (Main Menu->PeopleTools->Web Profile->Web Profile Configuration from the main menu). There are two checkboxes that control the behavior of Fluid UI. Disable Fluid Mode and Disable Fluid On Desktop. Disable Fluid Mode prevents any Fluid UI component from being run from this installation. This is a web profile setting for users that want to run later versions of PeopleTools but only want to run Classic PeopleSoft pages. The second setting, Disable Fluid On Desktop allows the Fluid UI to be run on mobile devices such as smartphones and tablets, but prevents Fluid UI from running on a desktop computer. Fluid UI settings are also make in My Personalizations (Main Menu->My Personalizations from the Main Menu), in the General Options section. In that section, each user has the choice to determine the home page for their desktop and for tablets. Now that you know the Fluid UI landing page is just a component, and the profile and personalization settings, you should be able to launch one. It’s pretty easy to add a menu using Structure and Content, just make sure the proper security is set up. You’ll have to run a Fluid UI supported browser in order to see it. Latest versions of Chrome, Firefox and IE will do. Check the certification page on MOS for all the details. When you open the first Fluid Landing Page, there’s not much there. Not to worry, we’ll get some content on it soon. Take a moment to navigate around and look at some of the header actions that were set up from the component properties. The home button takes you back to the classic system. You won’t see any notifications and the personalization doesn’t have any content to add. The NavBar icon on the top right has a lot of content, including a Navigator and Classic home. Spend some time looking through what’s available. Stay tuned for more. Next up is adding some content. Normal 0 false false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    Read the article

  • Where should Acceptance tests be written against?

    - by Jonn
    I'm starting to get into writing automated Acceptance tests and I'm quite confused where to write these tests against, specifically what layer in the app. Most examples I've seen are Acceptance tests written against the Domain but how about tests like: Given Incorrect Data When the user submits the form Then Play an Error Beep These seem to be fit for the UI and not for the Domain, or probably even the Service layer.

    Read the article

  • Visual Studio 2012 Coded UI technology matrix updated!

    - by krislankford
    The Visual Studio 2012 support matrix for Automated UI Testing (Coded UI) has been released by Microsoft and the full post can be found here. Thank you Shubhra! There are a couple of items on the list that you should definitely keep your eye on. The first item is the support for Silverlight 4  and 5. This should make the Silverlight community happy. I would also note the Planned items (blue dot) which are cross browser support and Flash/Java. Happy Coding!

    Read the article

  • jQuery UI ThemeRoller - Installing themes

    - by CJM
    I'm trying to install jQuery UI with a ThemeRoller theme for the first time. I've downloaded jquery 1.4.2... I've downloaded jQuery UI with a couple of themes. I've tried to follow the instructions but they seem contradictory and don't seem to related to the downloaded files. When I try to use a datepicker... the datepicker functionality works, but it has the default (grey) style. This page refers to a folder/sub-folder/css files that don't exist. This page refers to a ui.theme.css file that doesn't exist. The downloads I received included the following: --demos --docs --external --themes ----base ----[theme name] --ui ----i8n ----minified --js So what do you put where? I've copied the js to the appropriate directory and linked it into my page. And I copied the themes/base folder as well, and linked into the jquery.ui.all.css file. Even the included demos only display the default (grey) styling. Where am I going wrong? The head section: <script type="text/javascript" src="/scripts/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/scripts/jquery-ui-1.8.custom.min.js"></script> <link rel="Stylesheet" href="/css/smoothness/jquery.ui.all.css" /> The body section: <script type="text/javascript"> $(function() { $("#datepicker").datepicker(); }); </script> <div> <p>Date: <input type="text" id="datepicker" /></p> </div>

    Read the article

  • Windows 8 can't open any modern UI app

    - by Joyal
    I just upgraded my machine with Windows 7 Pro x64, to Windows 8 Pro x64, with the Windows 8 Upgrade Assistant. Everything went great, but none of the Modern UI Apps open, and they do not show any error messages or warnings, they just close right away I opened them. I tried to open Skydrive, Windows Store, Photo App,Music App, Bing, Videos , Finances and all the available Modern UI apps on my screen My screen resolution is 1080p, so it is not a resolution issue, I'm using a Windows account , but i switched to Local account but didn't solved the issue. I ran Windows Update and updated my nVidia video drivers. I also tried an app called "Metro App Troubleshooter" without luck

    Read the article

  • Windows 8 Metro UI with Multiple Monitors -- Keep in always maximized?

    - by Jersey Dude
    Before installing Win 8 today, my plan was to keep the Metro UI up on my smaller, laptop monitor and have the classic UI running on my two larger monitors. However, in reality, as soon as I click on something in one of the classic UI monitors, the Metro UI minimizes (thus exposing the classic UI in its place). Is there any way to keep the Metro UI from minimizing when I do something in another monitor? Oddly enough, if there is an app running/suspended in the Metro Window, then the Metro UI is not minimized. If the Start screen is currently viewed, clicking in a classic window/monitor switches the Metro UI from the start screen to the last run app. Very peculiar .. Thanks

    Read the article

  • Facebook rend open source Ringmark, sa suite de tests pour applications Web mobiles, plus de 400 tests disponibles

    Facebook rend open source Ringmark sa suite de tests pour applications Web mobiles, plus de 400 tests disponibles Facebook a publié sous une licence open source le code de Ringmark, une suite de tests pour les navigateurs mobiles pour la création d'applications mobiles Web. Ringmark avait été présenté pour la première fois il y a quelques semaines lors de l'événement Mobile World Congres de Barcelone. L'outil est conçu pour fournir aux développeurs des fonctionnalités de tests de base qu'ils ont besoin pour construire des applications Web mobiles conformes aux standards. La suite de tests va aider ceux-ci à mieux comprendre comment les navigateurs mobiles prennent en charge...

    Read the article

  • get the start position of an item using the jquery ui sortable plugin

    - by Rippo
    I am using the jQuery UI sortable plugin and I am trying to get 2 alerts I want the staring position of the element and the finished position of the element. $(function() { $("#filterlist ul").sortable({ opacity: 0.6, cursor: 'move', update: function(event, ui) { alert(ui.item.prevAll().length + 1); } }); }); I can get the position of the item after it has been dragged by using:- ui.item.prevAll().length + 1 What do I use to get the position it started from?

    Read the article

  • Problems with jQuery .not() and the draggable ui

    - by Chris
    Okay, when something is draggable, it is given the class .ui-draggable And when something is disabled from being draggable .ui-draggable-disabled I want to select only items that are draggable. I'm using the following selector, but it doesn't seem to work. My disabled draggable items are still doing something on hover. Any ideas why? $('.ui-draggable').not('.ui-draggable-disabled').hover(function() { // rest of code Thanks

    Read the article

  • Get attribute of JQuery ui.draggable

    - by Jon
    Hi Everyone, I'm using JqueryUI for drag and drop on one of my pages and for some reason I can't seem to get an attribute of the ui.draggable object being passed into my droppable drop event. ui.draggable.attr("src") and $(ui.draggable).attr("src") both return undefined, however if I type ui.draggable.html() I will get the html back. Any ideas?

    Read the article

  • jQuery UI Calendar displays too large, would like the demo size???

    - by Phill Pafford
    So I downloaded a custom themed UI for jQuery and added the calendar control to my sight (Example: link text). In the example it shows/displays the size I would like but on my webpage it's about twice the size. why??? I do have a ton of other CSS but I don't have control over the look and feel of the page (Can't touch current CSS, MEH!!). Is there a way to get the demo look on my site? I think this is the code that jQuery UI has that might be complicating things /* Component containers ----------------------------------*/ .ui-widget { font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 1.1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #B9C4CE; background: #ffffff url(../images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #616161; } .ui-widget-content a { color: #616161; } .ui-widget-header { border: 1px solid #467AA7; background: #467AA7 url(../images/ui-bg_highlight-soft_75_467AA7_1x100.png) 50% 50% repeat-x; color: #fff; font-weight: bold; } .ui-widget-header a { color: #fff; } It's part of the Custom UI CSS

    Read the article

  • How one does qualify as a Web UI Developer?

    - by Duralumin
    I have about 20 years of experience with programming, most of that on the job, and right now, I define myself as a Web Developer, because I think about half my expertise lies in the all too extended "web" field, both server side and client side, and because in the last years I'm mostly doing web development. I know my javascript, jQuery, jQueryUI, HTML4-5, css2-3 and some frameworks like backbone.js and angularJS Since university I've always been interested in Man-Machine Interaction, UI and UX. Recently, I saw the label "Web UI Developer" tossed around, and I thought that would be something I would like to qualify for. And I'd really like to qualify with confidence. I didn't find any certificate or similar, and I don't think there are any. Is the only way to qualify as a Web UI Developer having a job as one? What are the skills I need to have, and the resources I can use to acquire them?

    Read the article

  • Writing the tests for FluentPath

    - by Bertrand Le Roy
    Writing the tests for FluentPath is a challenge. The library is a wrapper around a legacy API (System.IO) that wasn’t designed to be easily testable. If it were more testable, the sensible testing methodology would be to tell System.IO to act against a mock file system, which would enable me to verify that my code is doing the expected file system operations without having to manipulate the actual, physical file system: what we are testing here is FluentPath, not System.IO. Unfortunately, that is not an option as nothing in System.IO enables us to plug a mock file system in. As a consequence, we are left with few options. A few people have suggested me to abstract my calls to System.IO away so that I could tell FluentPath – not System.IO – to use a mock instead of the real thing. That in turn is getting a little silly: FluentPath already is a thin abstraction around System.IO, so layering another abstraction between them would double the test surface while bringing little or no value. I would have to test that new abstraction layer, and that would bring us back to square one. Unless I’m missing something, the only option I have here is to bite the bullet and test against the real file system. Of course, the tests that do that can hardly be called unit tests. They are more integration tests as they don’t only test bits of my code. They really test the successful integration of my code with the underlying System.IO. In order to write such tests, the techniques of BDD work particularly well as they enable you to express scenarios in natural language, from which test code is generated. Integration tests are being better expressed as scenarios orchestrating a few basic behaviors, so this is a nice fit. The Orchard team has been successfully using SpecFlow for integration tests for a while and I thought it was pretty cool so that’s what I decided to use. Consider for example the following scenario: Scenario: Change extension Given a clean test directory When I change the extension of bar\notes.txt to foo Then bar\notes.txt should not exist And bar\notes.foo should exist This is human readable and tells you everything you need to know about what you’re testing, but it is also executable code. What happens when SpecFlow compiles this scenario is that it executes a bunch of regular expressions that identify the known Given (set-up phases), When (actions) and Then (result assertions) to identify the code to run, which is then translated into calls into the appropriate methods. Nothing magical. Here is the code generated by SpecFlow: [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Change extension")] public virtual void ChangeExtension() { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Change extension", ((string[])(null))); #line 6 this.ScenarioSetup(scenarioInfo); #line 7 testRunner.Given("a clean test directory"); #line 8 testRunner.When("I change the extension of " + "bar\\notes.txt to foo"); #line 9 testRunner.Then("bar\\notes.txt should not exist"); #line 10 testRunner.And("bar\\notes.foo should exist"); #line hidden testRunner.CollectScenarioErrors();} The #line directives are there to give clues to the debugger, because yes, you can put breakpoints into a scenario: The way you usually write tests with SpecFlow is that you write the scenario first, let it fail, then write the translation of your Given, When and Then into code if they don’t already exist, which results in running but failing tests, and then you write the code to make your tests pass (you implement the scenario). In the case of FluentPath, I built a simple Given method that builds a simple file hierarchy in a temporary directory that all scenarios are going to work with: [Given("a clean test directory")] public void GivenACleanDirectory() { _path = new Path(SystemIO.Path.GetTempPath()) .CreateSubDirectory("FluentPathSpecs") .MakeCurrent(); _path.GetFileSystemEntries() .Delete(true); _path.CreateFile("foo.txt", "This is a text file named foo."); var bar = _path.CreateSubDirectory("bar"); bar.CreateFile("baz.txt", "bar baz") .SetLastWriteTime(DateTime.Now.AddSeconds(-2)); bar.CreateFile("notes.txt", "This is a text file containing notes."); var barbar = bar.CreateSubDirectory("bar"); barbar.CreateFile("deep.txt", "Deep thoughts"); var sub = _path.CreateSubDirectory("sub"); sub.CreateSubDirectory("subsub"); sub.CreateFile("baz.txt", "sub baz") .SetLastWriteTime(DateTime.Now); sub.CreateFile("binary.bin", new byte[] {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0xFF}); } Then, to implement the scenario that you can read above, I had to write the following When: [When("I change the extension of (.*) to (.*)")] public void WhenIChangeTheExtension( string path, string newExtension) { var oldPath = Path.Current.Combine(path.Split('\\')); oldPath.Move(p => p.ChangeExtension(newExtension)); } As you can see, the When attribute is specifying the regular expression that will enable the SpecFlow engine to recognize what When method to call and also how to map its parameters. For our scenario, “bar\notes.txt” will get mapped to the path parameter, and “foo” to the newExtension parameter. And of course, the code that verifies the assumptions of the scenario: [Then("(.*) should exist")] public void ThenEntryShouldExist(string path) { Assert.IsTrue(_path.Combine(path.Split('\\')).Exists); } [Then("(.*) should not exist")] public void ThenEntryShouldNotExist(string path) { Assert.IsFalse(_path.Combine(path.Split('\\')).Exists); } These steps should be written with reusability in mind. They are building blocks for your scenarios, not implementation of a specific scenario. Think small and fine-grained. In the case of the above steps, I could reuse each of those steps in other scenarios. Those tests are easy to write and easier to read, which means that they also constitute a form of documentation. Oh, and SpecFlow is just one way to do this. Rob wrote a long time ago about this sort of thing (but using a different framework) and I highly recommend this post if I somehow managed to pique your interest: http://blog.wekeroad.com/blog/make-bdd-your-bff-2/ And this screencast (Rob always makes excellent screencasts): http://blog.wekeroad.com/mvc-storefront/kona-3/ (click the “Download it here” link)

    Read the article

  • How should UI layer pass user input to BL layer?

    - by BornToCode
    I'm building an n-tier application, I have UI, BL, DAL & Entities (built from POCO) projects. (All projects have a reference to the Entities). My question is - how should I pass user input from the UI to the BL, as a bunch of strings passed to the BL method and the BL will build the object from the parameters, or should I build the objects inside the UI submit_function and send objects as parameters? EDIT: I wrote n-tier application, but what I actually meant was just layers.

    Read the article

  • Oracle 64-bit assembly throws BadImageFormatException when running unit tests

    - by pjohnson
    We recently upgraded to the 64-bit Oracle client. Since then, Visual Studio 2010 unit tests that hit the database (I know, unit tests shouldn't hit the database--they're not perfect) all fail with this error message:Test method MyProject.Test.SomeTest threw exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.I resolved this by changing the test settings to run tests in 64-bit. From the Test menu, go to Edit Test Settings, and pick your settings file. Go to Hosts, and change the "Run tests in 32 bit or 64 bit process" dropdown to "Run tests in 64 bit process on 64 bit machine". Now your tests should run.This fix makes me a little nervous. Visual Studio 2010 and earlier seem to change that file for no apparent reason, add more settings files, etc. If you're not paying attention, you could have TestSettings1.testsettings through TestSettings99.testsettings sitting there and never notice the difference. So it's worth making a note of how to change it in case you have to redo it, and being vigilant about files VS tries to add.I'm not entirely clear on why this was even a problem. Isn't that the point of an MSIL assembly, that it's not specific to the hardware it runs on? An IL disassembler can open the Oracle.DataAccess.dll in question, and in its Runtime property, I see the value "v4.0.30319 / x64". So I guess the assembly was specifically build to target 64-bit platforms only, possibly due to a 64-bit-specific difference in the external Oracle client upon which it depends. Most other assemblies, especially in the .NET Framework, list "msil", and a couple list "x86". So I guess this is another entry in the long list of ways Oracle refuses to play nice with Windows and .NET.If this doesn't solve your problem, you can read others' research into this error, and where to change the same test setting in Visual Studio 2012.

    Read the article

  • How to test the tests?

    - by Ryszard Szopa
    We test our code to make it more correct (actually, less likely to be incorrect). However, the tests are also code -- they can also contain errors. And if your tests are buggy, they hardly make your code better. I can think of three possible types of errors in tests: Logical errors, when the programmer misunderstood the task at hand, and the tests do what he thought they should do, which is wrong; Errors in the underlying testing framework (eg. a leaky mocking abstraction); Bugs in the tests: the test is doing slightly different than what the programmer thinks it is. Type (1) errors seem to be impossible to prevent (unless the programmer just... gets smarter). However, (2) and (3) may be tractable. How do you deal with these types of errors? Do you have any special strategies to avoid them? For example, do you write some special "empty" tests, that only check the test author's presuppositions? Also, how do you approach debugging a broken test case?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >