Search Results

Search found 10206 results on 409 pages for 'tooling and testing'.

Page 78/409 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Simulating a missing gem in Ruby unit tests

    - by ktex
    Is there any way to simulate the absence of a gem for certain unit tests, short of actually uninstalling and then reinstalling the gem during testing? I am writing a command line utility, and want to make sure that my tests cover cases where a user may not have all of the gems that I support. For instance, I am using fsevents — a Leopard-specific package for monitoring filesystem events — that will never be present on other systems, as well as a growl gem that's purely optional.

    Read the article

  • Do you do unit tests for non production code?

    - by Ikaso
    I am interested in the following scenario specifically. Suppose you have team that writes production code and a team that writes automatic tests. The team that writes automatic tests has a dedicated framework intended to write the automatic tests. Should the testing team write unit tests for their framework although the framework is not used in production?

    Read the article

  • Unit tests and fixtures

    - by Wizzard
    We have a bunch of unit tests which test a lot of webpages and REST API services. Currently when our tests run it pulls from these pages live but this can take ages to run sometimes, and it also feels like the tests should be testing more of our code - not just relying on them being up and responding (if that makes sense..). Is it better practice to save a valid api response and with the unit tests load this in during setup? Thoughts?

    Read the article

  • How to manage IoC containers in tests?

    - by frosty
    I'm very new to testing and IoC containers and have two projects: MySite.Website (MVC) MySite.WebsiteTest Currently I have an IoC container in my website. Should I recreate another IoC container for my test? Or is there a way to use the IoC in both?

    Read the article

  • Building a life-critical System using Agile

    - by Ben Breen
    Looking at the general trend of comments in my question about Building an Aircraft using Agile, the biggest problem other than cost appears to be safety. Do people feel that it is not possible to build a safe system (or prove it is safe) using agile? Doesn’t all the iterative testing mitigate this? Is it likely that a piece of software developed using agile will never be as reliable as counterparts such as waterfall?

    Read the article

  • How deep are your unit tests?

    - by John Nolan
    The thing I've found about TDD is that its takes time to get your tests set up and being naturally lazy I always want to write as little code as possible. The first thing I seem do is test my constructor has set all the properties but is this overkill? My question is to what level of granularity do you write you unit tests at? ..and is there a case of testing too much?

    Read the article

  • Windows Mobile Hopper Test Tool, FocusApp

    - by jan
    Hi recently I finished my WM6 Pro.6.1 application and happily learned that to put it into marketplace, it has to pass some tests. -Application Verifier -Microsoft Hopper Test Tool for Windows Mobile 6.0, 6.1, and 6.5 I use VS 2008 and windows mobile 6.1 and I couldnt run none of these tests, Hopeer tool has a FocusApp c++ application which I must build and run before testing, but its a VS 2005 project and I couldnt run it on VS 200..and without it I can't test anything. any ideas how can I build that for VS2008?

    Read the article

  • Creating Tests at Runtime

    - by James Thigpen
    Are there any .NET testing frameworks which allow dynamic creation of tests without having to deal with a hokey Attribute syntax? Something like: foreach (var t in tests) { TestFx.Run(t.Name, t.TestDelegate); } But with the test reporting as you would expect... I could do something like this with RowTests et al, but that seems hokey.

    Read the article

  • how can protected members of base class be accessed during unit test?

    - by amateur
    I am creating a unit test in mstest with rhino mocks. I have a class A that inherits class B. I am testing class A and create an instance of it for my test. The class it inherits, "B", has some protected methods and protected properties that I would like to access for the benefit of my tests. For example, validate that a protected property on my base class has the expected value. Any ideas how I might access these protected properties of class B during my test?

    Read the article

  • Is there an in memory database that supports the DATE function?

    - by Chris J
    Hi, I am doing some unit testing for a DAO that works with postgresql. Some of the SQL queries that my DAO uses involve the DATE function. Is there an in-memory database that supports functions similar to the ones that postgresql does? Currently I am looking for support for the DATE function however, I obviously can see myself using other functions in the future.

    Read the article

  • Looking for WebAii Framework free edition online - before the Telerik merge

    - by jdk
    Art of Test produced a nice UI testing tool for free -- WebAii Framework-- that I've been using to add client-side DOM unit tests to my projects. Recently they merged with Telerik and it's now a commercial product. From free to $1500 is suddenly very expensive. Does anybody know if the community edition is still available, or even the last free version is available for download? At least I can finish off with that.

    Read the article

  • How do I verify my EF4 Code-Only mappings?

    - by Tomas Lycken
    In NHibernate, there is a method doing something like ThisOrThat.VeryfyMappings() (I don't know the exact definition of it since it was a while ago I last tried NHibernate...) I recall seeing a blog post somewhere where the author showed how to do some similar testing in Entity Framework 4, but now I cant find it. So, how do I test my EF4 Code-Only mappings?

    Read the article

  • Application test recommendation

    - by Polaris
    I never use unitests in my apps . I know that exists many technologies for testing .NET based application. (For example NUnit). Which of this tools more comfortable and more understandable to use. Please can you show the good articles where can I find information about unitests and understand key situation where I must use them?

    Read the article

  • How to write a test for accounts controller for forms authenticate

    - by Anil Ali
    Trying to figure out how to adequately test my accounts controller. I am having problem testing the successful logon scenario. Issue 1) Am I missing any other tests.(I am testing the model validation attributes separately) Issue 2) Put_ReturnsOverviewRedirectToRouteResultIfLogonSuccessAndNoReturnUrlGiven() and Put_ReturnsRedirectResultIfLogonSuccessAndReturnUrlGiven() test are not passing. I have narrowed it down to the line where i am calling _membership.validateuser(). Even though during my mock setup of the service i am stating that i want to return true whenever validateuser is called, the method call returns false. Here is what I have gotten so far AccountController.cs [HandleError] public class AccountController : Controller { private IMembershipService _membershipService; public AccountController() : this(null) { } public AccountController(IMembershipService membershipService) { _membershipService = membershipService ?? new AccountMembershipService(); } [HttpGet] public ActionResult LogOn() { return View(); } [HttpPost] public ActionResult LogOn(LogOnModel model, string returnUrl) { if (ModelState.IsValid) { if (_membershipService.ValidateUser(model.UserName,model.Password)) { if (!String.IsNullOrEmpty(returnUrl)) { return Redirect(returnUrl); } return RedirectToAction("Index", "Overview"); } ModelState.AddModelError("*", "The user name or password provided is incorrect."); } return View(model); } } AccountServices.cs public interface IMembershipService { bool ValidateUser(string userName, string password); } public class AccountMembershipService : IMembershipService { public bool ValidateUser(string userName, string password) { throw new System.NotImplementedException(); } } AccountControllerFacts.cs public class AccountControllerFacts { public static AccountController GetAccountControllerForLogonSuccess() { var membershipServiceStub = MockRepository.GenerateStub<IMembershipService>(); var controller = new AccountController(membershipServiceStub); membershipServiceStub .Stub(x => x.ValidateUser("someuser", "somepass")) .Return(true); return controller; } public static AccountController GetAccountControllerForLogonFailure() { var membershipServiceStub = MockRepository.GenerateStub<IMembershipService>(); var controller = new AccountController(membershipServiceStub); membershipServiceStub .Stub(x => x.ValidateUser("someuser", "somepass")) .Return(false); return controller; } public class LogOn { [Fact] public void Get_ReturnsViewResultWithDefaultViewName() { // Arrange var controller = GetAccountControllerForLogonSuccess(); // Act var result = controller.LogOn(); // Assert Assert.IsType<ViewResult>(result); Assert.Empty(((ViewResult)result).ViewName); } [Fact] public void Put_ReturnsOverviewRedirectToRouteResultIfLogonSuccessAndNoReturnUrlGiven() { // Arrange var controller = GetAccountControllerForLogonSuccess(); var user = new LogOnModel(); // Act var result = controller.LogOn(user, null); var redirectresult = (RedirectToRouteResult) result; // Assert Assert.IsType<RedirectToRouteResult>(result); Assert.Equal("Overview", redirectresult.RouteValues["controller"]); Assert.Equal("Index", redirectresult.RouteValues["action"]); } [Fact] public void Put_ReturnsRedirectResultIfLogonSuccessAndReturnUrlGiven() { // Arrange var controller = GetAccountControllerForLogonSuccess(); var user = new LogOnModel(); // Act var result = controller.LogOn(user, "someurl"); var redirectResult = (RedirectResult) result; // Assert Assert.IsType<RedirectResult>(result); Assert.Equal("someurl", redirectResult.Url); } [Fact] public void Put_ReturnsViewIfInvalidModelState() { // Arrange var controller = GetAccountControllerForLogonFailure(); var user = new LogOnModel(); controller.ModelState.AddModelError("*","Invalid model state."); // Act var result = controller.LogOn(user, "someurl"); var viewResult = (ViewResult) result; // Assert Assert.IsType<ViewResult>(result); Assert.Empty(viewResult.ViewName); Assert.Same(user,viewResult.ViewData.Model); } [Fact] public void Put_ReturnsViewIfLogonFailed() { // Arrange var controller = GetAccountControllerForLogonFailure(); var user = new LogOnModel(); // Act var result = controller.LogOn(user, "someurl"); var viewResult = (ViewResult) result; // Assert Assert.IsType<ViewResult>(result); Assert.Empty(viewResult.ViewName); Assert.Same(user,viewResult.ViewData.Model); Assert.Equal(false,viewResult.ViewData.ModelState.IsValid); } } }

    Read the article

  • Run unit tests in Jenkins / Hudson in automated fashion from dev to build server

    - by Kevin Donde
    We are currently running a Jenkins (Hudson) CI server to build and package our .net web projects and database projects. Everything is working great but I want to start writing unit tests and then only passing the build if the unit tests pass. We are using the built in msbuild task to build the web project. With the following arguments ... MsBuild Version .NET 4.0 MsBuild Build File ./WebProjectFolder/WebProject.csproj Command Line Arguments ./target:Rebuild /p:Configuration=Release;DeployOnBuild=True;PackageLocation=".\obj\Release\WebProject.zip";PackageAsSingleFile=True We need to run automated tests over our code that run automatically when we build on our machines (post build event possibly) but also run when Jenkins does a build for that project. If you run it like this it doesn't build the unit tests project because the web project doesn't reference the test project. The test project would reference the web project but I'm pretty sure that would be butchering our automated builds as they exist primarily to build and package our deployments. Running these tests should be a step in that automated build and package process. Options ... Create two Jenkins jobs. one to run the tests ... if the tests pass another build is triggered which builds and packages the web project. Put the post build event on the test project. Build the solution instead of the project (make sure the solution contains the required tests) and put post build events on any test projects that would run the nunit console to run the tests. Then use the command line to copy all the required files from each of the bin and content directories into a package. Just build the test project in jenkins instead of the web project in jenkins. The test project would reference the web project (depending on what you're testing) and build it. Problems ... There's two jobs and not one. Two things to debug not one. One to see if the tests passed and one to build and compile the web project. The tests could pass but the build could fail if its something that isn't used by what you're testing ... This requires us to know exactly what goes into the build. Right now msbuild does it all for us. If you have multiple teams working on a project everytime an extra folder is created you have to worry about the possibly brittle command line statements. This seems like a corruption of our main purpose here. The tests should be a step in this process not the overriding most important thing in this process. I'm also not 100% sure that a triggered build is the same as a normal build does it do all the same things as a normal build. Move all the correct files in the same way move them all into the same directories etc. Initial problem. We want to run our tests whenever our main project is built. But adding a post build event to the web project that runs against the test project doesn't work because the web project doesn't reference the test project and won't trigger a build of this project. I could go on ... but that's enough ... We've spent about a week trying to make this work nicely but haven't succeeded. Feel free to edit this if you feel you can get a better response ...

    Read the article

  • Can I override task :environment in test_helper.rb to test rake tasks?

    - by Michael Barton
    I have a series of rake tasks in a Rakefile which I'd like to test as part of my specs etc. Each task is defined in the form: task :do_somthing => :environment do # Do something with the database here end Where the :environment task sets up an ActiveRecord/DataMapper database connection and classes. I'm not using this as part of Rails but I have a series of tests which I like to run as part of BDD. This snippet illustrates how I'm trying to test the rake tasks. def setup @rake = Rake::Application.new Rake.application = @rake load File.dirname(__FILE__) + '/../../tasks/do_something.rake' end should "import data" do @rake["do_something"].invoke assert something_in_the_database end So my request for help - is it possible to over-ride the :environment task in my test_helper.rb file so I my rake testing interacts with the my test database, rather than production? I've tried redefining the task in the helper file, but this doesn't work. Any help for a solution would be great, as I've been stuck on this for the past week.

    Read the article

  • CSS regression tool?

    - by ronaldwidha
    I'm looking for a visual regression testing tool for CSS refactoring and see whether or not there are any unintended cascading behavior in a website. Ideally, the tool that can crawl a website (even locally) and grab snapshots of each page and store it in a single repository. When run for the second time, it will show the pages that are visually different since the last time it was run. Even better: if it can show the overlapper XOR view of the 2 version of the page. compare rendering results of different browsers (almost like an automated Microsoft Expression Web compare feature). Thanks

    Read the article

  • How to unit test asynchronous APIs?

    - by Ben Clayton
    Hi all. I have installed Google Toolbox for Mac (http://code.google.com/p/google-toolbox-for-mac/) into Xcode and followed the instructions to set up unit testing found here (http://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting). It all works great, and I can test my synchronous methods on all my objects absolutely fine. However, most of the complex APIs I actually want to test return results asynchronously via calling a method on a delegate - for example a call to a file download and update system will return immediately and then run a -fileDownloadDidComplete: method when the file finishes downloading. How would I test this as a unit test? It seems like I'd want to the testDownload function, or at least the test framework to 'wait' for fileDownloadDidComplete: method to run. Any ideas much appreciated!

    Read the article

  • Unit-test FileSystemWatcher.Error Event

    - by dotNetkow
    I'm trying to unit test a private method that I have attached to my FileSystemWatcher's Error event. MSDN says that this event "occurs when the internal buffer overflows." I've tried to cause a buffer overflow but have not been successful so far. The FileSystemWatcher's various properties are: fileWatcher.IncludeSubdirectories = false; fileWatcher.Filter = "*"; fileWatcher.NotifyFilter = (NotifyFilters.FileName | NotifyFilters.LastAccess | NotifyFilters.Size); What is the best way of raising this event for the purpose of unit-testing?

    Read the article

  • Recommendations for keeping a build server updated

    - by gareth_bowles
    As a guy who frequently switches between QA, build and operations, I keep running into the issue of what to do about operating system updates on the build server. The dichotomy is the same on Windows, Linux, MacOS or any other o/s that can update itself via the internet: The QA team wants to keep the build server exactly as it is from the beginning of the product release cycle to the end, since installing updates could destabilize the server and means that successive builds aren't made against the same baseline. The ops team wants the software to be deployed on a system with all the latest security patches; this can mean that the software isn't deployed on exactly the same version of the o/s that it was built on. I usually mitigate this by taking release candidate builds and installing them on a test server that has a completely up-to-date o/s, repeating the automated tests that are run on the build server and doing some additional system level testing to make sure everything looks good before deployment. However, this seems inefficient to me; does anyone have a better way ?

    Read the article

  • <100% Test coverage - best practices in selecting test areas

    - by Paul Nathan
    Suppose you're working on a project and the time/money budget does not allow 100% coverage of all code/paths. It then follows that some critical subset of your code needs to be tested. Clearly a 'gut-check' approach can be used to test the system, where intuition and manual analysis can produce some sort of test coverage that will be 'ok'. However, I'm presuming that there are best practices/approaches/processes that identify critical elements up to some threshold and let you focus your test elements on those blocks. For example, one popular process for identifying failures in manufacturing is Failure Mode and Effects Analysis. I'm looking for a process(es) to identify critical testing blocks in software.

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >