Search Results

Search found 12476 results on 500 pages for 'unit testing'.

Page 16/500 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • What is the best approach for unit testing/integration testing GXT code?

    - by Arizonahockey
    I have been tasked to setup a continuous integration environment for a GXT 2.1.1 and GWT 2.0.1 environment. Unfortunately I am new to AJAX and Web Services and have little idea how to setup unit tests in the browser environment. Unit tests for the server backend I already have done, since I am a pro at that. GXT is not quite pure GWT which provides some unit testing structure. If anyone has a good starting point...

    Read the article

  • ReSharper Unit Test Runner: Support for Deployment Items

    - by driis
    I like the Unit test runner in ReSharper 4.5, and would like to use it with my MSTest tests, but one thing annoys me: In some of our solutions, we have set up some Deployment Items in the .testrunconfig file. The ReSharper Unit Test runner does not seem to respect this, so I get errors when trying to run the unit tests from ReSharper. Is there any workraound for this ? Update: citizenmatt's answer was correct, the option to use a .testrunconfig with ReSharper exists in the Options dialog of ReSharper. You have to select the unit test provider on the list, then the controls to do that appears. (That was not obvious or discoverable, at least not for me ;-)

    Read the article

  • Is Unit Testing important?

    - by PieterG
    I've recently been catching up on my podcasts and reading and found this article from Joel Spolsky. The Question that I for all of you is the following. Is Unit Testing Important? What do you test? Do you write unit tests on all your projects? I suppose this question is a bit more of a poll on unit test coverage.

    Read the article

  • Visual Studio Unit Testing of Windows Forms

    - by GWLlosa
    We're working on a project here in Visual Studio 2008. We're using the built-in testing suite provided with it (the Microsoft.VisualStudio.TestTools.UnitTesting namespace). It turns out, that much to our chagrin, a great deal of complexity (and therefore errors) have wound up coded into our UI layer. While our unit tests do a decent job of covering our business layer, our UI layer is a constant source of irritation. We'd ideally like to unit-test that, as well. Does anyone know of a good "Microsoft-compatible" way of doing that in visual studio? Will it introduce some sort of conflict to 'mix' unit testing frameworks like nUnitForms with the Microsoft stuff? Are there any obvious bear traps I should be aware of with unit-testing forms?

    Read the article

  • Prove correctness of unit test

    - by Timo Willemsen
    I'm creating a graph framework for learning purposes. I'm using a TDD approach, so I'm writing a lot of unit tests. However, I'm still figuring out how to prove the correctness of my unit tests For example, I have this class (not including the implementation, and I have simplified it) public class SimpleGraph(){ //Returns true on success public boolean addEdge(Vertex v1, Vertex v2) { ... } //Returns true on sucess public boolean addVertex(Vertex v1) { ... } } I also have created this unit tests @Test public void SimpleGraph_addVertex_noSelfLoopsAllowed(){ SimpleGraph g = new SimpleGraph(); Vertex v1 = new Vertex('Vertex 1'); actual = g.addVertex(v1); boolean expected = false; boolean actual = g.addEdge(v1,v1); Assert.assertEquals(expected,actual); } Okay, awesome it works. There is only one crux here, I have proved that the functions work for this case only. However, in my graph theory courses, all I'm doing is proving theorems mathematically (induction, contradiction etc. etc.). So I was wondering is there a way I can prove my unit tests mathematically for correctness? So is there a good practice for this. So we're testing the unit for correctness, instead of testing it for one certain outcome.

    Read the article

  • Testing + production server and syncing MySQL data

    - by Matthew
    I have a web application running on LAMP with a testing server and a production server. Is there a standard practice for keeping the data on the testing server in sync with the production server? The data on the testing server gets out of date pretty quick and I feel like there must be an easier way than just dumping the production server and copying it onto the testing server every so often. It's not important that the data is in total sync, just that the testing server represents the production enviornment as accurately as possible.

    Read the article

  • Migrate Spring JPA DAO unit testing to google app engine

    - by twingocerise
    I'm trying to put together a simple environment where I can get Spring, Maven, JPA, Google App Engine and DAO unit testing working happily all together. The goal is to be able to run a simple DAO unit test creating an entity and then load it again with a simple find to check it's been created properly - all of this from my maven build. My dao is making use of the JPA entity manager (query(), persist(), etc.) I've got it working no problem with hsqldb and a datasource, etc. but I'm struggling to get it working with appengine. My questions are: 1) I'm using an entity manager, injecting my persistence unit as followed. Is it OK? Is there any need for a datasource or something special? I thought not but correct me if I'm wrong. applicationContext.xml <bean id='entityManagerFactory' class='org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean'> <property name="persistenceUnitName" value="transactions-optional" /> </bean> Persistence.xml <persistence-unit name="transactions-optional"> <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider> <properties> <property name="datanucleus.NontransactionalRead" value="true"/> <property name="datanucleus.NontransactionalWrite" value="true"/> <property name="datanucleus.ConnectionURL" value="appengine"/> </properties> </persistence-unit> 2) what are the dependencies I need to add to my pom file to be able to run the unit test making use of the entityManager? What about versions ? I found loads of things about appengine-api-labs/stubs/testing but none them got it working i.e. I'm getting jdo dependency missing while I'm using JPA... I also get loads of conflicts when I try to add some jars (datanucleus and stuff). So far I'm trying appengine-api-1.0-sdk v1.7.0 - ASM-all v3.3 - datanucleus core/api-jpa/enhancer v3.1.0 - datanucleus-appengine v2.0.1.1 and all the gae testing jars v1.7.0 3) Is there anything I need to add to my surefire plugin (test runner) to make sure it picks up all the dependencies? I'm getting an exhausting ClassNotFound on DatastorePersistenceProvider while it is in my classpath (I checked the jars and the mvn dependency:tree) I had a look at this but it doesn't seem to be working at all: http://www.vertigrated.com/blog/2011/02/working-maven-3-google-app-engine-plugin-with-gwt-support/ 4) Do I need to use any sot of localhelper to test my DAOs? Ideally I'd want to test my dao layer "as is" with the entity manager... what's your opinion ? Has anyone managed to run a unit test using JPA on google app engine ? 5) Do I need to set up any sort of gae.home somewhere in my pom file? Would anyone make use of it (a plugin or something) ? 6) Is the gwt-maven plugin any helpful if I don't use gwt - I'm writing a simple webservice making use of appengine, not a GWT app... Any help would be much appreciated as I've been struggling for 2 days now... Cheers, V.

    Read the article

  • Unit testing class in a web service in .net

    - by Dan Bailiff
    After some digging here, I took the advice in this thread: http://stackoverflow.com/questions/371961/how-to-unit-test-c-web-service-with-visual-studio-2008 I've created a separate class and my web service class is just a wrapper for that one. The problem is that when I try to create a unit test project in VS2008, it insists on creating a unit test that acts like I'm testing the web service calls instead of the class I specified. I can't get to the class I'm trying to test. I have a web service "subscription_api.asmx". The code behind is "subscription_api.cs" which contains the web method wrapper calls to the real code at "subscription.cs". I would expect to be able to do the following: [TestMethod()] public void GetSystemStatusTest() { subscription sub = new subscription(); XmlNode node = sub.GetSystemStatusTest(); Assert.IsNotNull(node); } But instead I get this mess which is autogenerated from VS'08: /// <summary> ///A test for GetSystemStatus ///</summary> // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example, // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server, // whether you are testing a page, web service, or a WCF service. [TestMethod()] [HostType("ASP.NET")] [AspNetDevelopmentServerHost("C:\\CVSROOT\\rnr\\pro\\product\\wms\\ss\\subscription_api", "/subscription_api")] [UrlToTest("http://localhost/subscription_api")] public void GetSystemStatusTest() { subscription_Accessor target = new subscription_Accessor(); // TODO: Initialize to an appropriate value XmlNode expected = null; // TODO: Initialize to an appropriate value XmlNode actual; actual = target.GetSystemStatus(); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); } Additionally, there is a "subscription_api.accessor" in the Test References folder. When I try this: [TestMethod()] public void GetSystemStatusTest2() { subscription_Accessor sub = new subscription_Accessor(); XmlNode node = sub.GetSystemStatus(); Assert.IsNotNull(node); } I get an error: Test method subscription_api.Test.subscriptionTest.GetSystemStatusTest2 threw exception: System.TypeInitializationException: The type initializer for 'subscription_Accessor' threw an exception. ---> System.ArgumentNullException: Value cannot be null. I'm really new to unit testing and feel lost. How can I create a unit test just for my subscription class in "subscription.cs" without testing the web service? Am I limited to testing within the same project (I hope not)? Do I have to put the target class in its own project outside of the web service project?

    Read the article

  • Is Unit Testing worth the effort?

    - by The Talking Walnut
    I am working to integrate unit testing into the development process on the team I work on and there are some skeptics. What are some good ways to convince the skeptical developers on the team of the value of Unit Testing? In my specific case we would be adding Unit Tests as we add functionality or fixed bugs. Unfortunately our code base does not lend itself to easy testing.

    Read the article

  • Unit Testing a CSV Parser and Column Mapping Tool

    - by PieterG
    I am really starting to enjoy unit testing and have the following question to the gurus of unit testing. Let's for example say I have the following class public class FileMapper { public Dictionary<string, string> ReadFile(string filename, string delimeter){} } How do you guys generally go about unit testing a Parser or ReadFile method in my case?

    Read the article

  • Multiple arrangements/asserts per unit test?

    - by lance
    A group of us (.NET developers) are talking unit testing. Not any one framework (we've hit on MSpec, NUint, MSTest, RhinoMocks, TypeMock, etc) -- we're just talking generally. We see lots of syntax that forces a distinct unit test per scenario, but we don't see an avenue to re-using one unit test with various inputs or scenarios. Also, we don't see an avenue to multiple asserts in a given test without an early assert's failure threatening the testing of later asserts (in the same test). Is there anything like that happening in .NET unit testing (state- or behavior-based) today?

    Read the article

  • Second Unit Test Not Running

    - by TomJ
    I am having trouble getting my Method B test to run. The logic is fine, but when the unit tests are run, only Method A will run. If Method A and B are switched in terms of spots, only Method B will run. So clearly the code is wrong at some point. Do I need to call method B's test from inside method A in order to get both unit tests to run? I'm pretty new to C#, so forgive my basic question. using redacted; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; namespace UnitTests { [TestClass()] public class ClassTest { public TestContext TestContext{get;set;} [TestMethod()] public void MethodATest() { the unit test } [TestMethod()] public void MethodBTest() { the unit test } } }

    Read the article

  • Getting started with unit testing in VS2010?

    - by Herb Caudill
    I'm new to both unit testing and Visual Studio 2010 (just upgraded from 2008). I'm interested in using VS2010's new built-in unit testing tools, but would like to get the lay of the land first. I haven't been able to find any resources or tutorials on unit testing with VS2010 specifically - has anyone found a good walk-through? I'm also open to persuasion that we should stick with NUnit or the like, if anyone knows a reason to avoid the built-in tools.

    Read the article

  • C# Unit testing resources

    - by Mohit Deshpande
    I migrated from Java to C# and so I am wondering how to unit tests in C#. I remember using JUnit to test my Java applications and importing the package, etc. How can I unit test in C#? What are some good resources for unit testing in C#?

    Read the article

  • How can I change ruby log level in unit tests based on context

    - by Stuart
    I'm new to ruby so forgive me if this is simple or I get some terminology wrong. I've got a bunch of unit tests (actually they're integration tests for another project, but they use ruby test/unit) and they all include from a module that sets up an instance variable for the log object. When I run the individual tests I'd like log.level to be debug, but when I run a suite I'd like log.level to be error. Is it possible to do this with the approach I'm taking, or does the code need to be restructured? Here's a small example of what I have so far. The logging module: #!/usr/bin/env ruby require 'logger' module MyLog def setup @log = Logger.new(STDOUT) @log.level = Logger::DEBUG end end A test: #!/usr/bin/env ruby require 'test/unit' require 'mylog' class Test1 < Test::Unit::TestCase include MyLog def test_something @log.info("About to test something") # Test goes here @log.info("Done testing something") end end A test suite made up of all the tests in its directory: #!/usr/bin/env ruby Dir.foreach(".") do |path| if /it-.*\.rb/.match(File.basename(path)) require path end end

    Read the article

  • A good way to write unit tests

    - by bobobobo
    So, I previously wasn't really in the practice of writing unit tests - now I kind of am and I need to check if I'm on the right track. Say you have a class that deals with math computations. class Vector3 { public: // Yes, public. float x,y,z ; // ... ctors ... } ; Vector3 operator+( const Vector3& a, const Vector3 &b ) { return Vector3( a.x + b.y /* oops!! hence the need for unit testing.. */, a.y + b.y, a.z + b.z ) ; } There are 2 ways I can really think of to do a unit test on a Vector class: 1) Hand-solve some problems, then hard code the numbers into the unit test and pass only if equal to your hand and hard-coded result bool UnitTest_ClassVector3_operatorPlus() { Vector3 a( 2, 3, 4 ) ; Vector3 b( 5, 6, 7 ) ; Vector3 result = a + b ; // "expected" is computed outside of computer, and // hard coded here. For more complicated operations like // arbitrary axis rotation this takes a bit of paperwork, // but only the final result will ever be entered here. Vector3 expected( 7, 9, 11 ) ; if( result.isNear( expected ) ) return PASS ; else return FAIL ; } 2) Rewrite the computation code very carefully inside the unit test. bool UnitTest_ClassVector3_operatorPlus() { Vector3 a( 2, 3, 4 ) ; Vector3 b( 5, 6, 7 ) ; Vector3 result = a + b ; // "expected" is computed HERE. This // means all you've done is coded the // same thing twice, hopefully not having // repeated the same mistake again Vector3 expected( 2 + 5, 6 + 3, 4 + 7 ) ; if( result.isNear( expected ) ) return PASS ; else return FAIL ; } Or is there another way to do something like this?

    Read the article

  • Grails unit testing and bootstrap

    - by tbruyelle
    I wrote an unit test for a controller. I have a Bootstrap file which alter the metaclass of domain classes by adding a method asPublicMap(). I use this method in the controller to return domain classes as json but only some selected public fields. My unit test failed because of MissingMethodException for asPublicMap(). As I understood, bootstrap classes are not loaded for unit tests, only for integration tests. That's why I got this error. My question is : Is there another place to put metaclass manipulation in order to take them into account during unit tests ?

    Read the article

  • JUnit - Testing a method that in turn invokes a few more methods

    - by stratwine
    Hi, This is my doubt on what we regard as a "unit" while unit-testing. say I have a method like this, public String myBigMethod() { String resultOne = moduleOneObject.someOperation(); String resultTwo = moduleTwoObject.someOtherOperation(resultOne); return resultTwo; } ( I have unit-tests written for someOperation() and someOtherOperation() seperately ) and this myBigMethod() kinda integrates ModuleOne and ModuleTwo by using them as above, then, is the method "myBigMethod()" still considered as a "unit" ? Should I be writing a test for this "myBigMethod()" ? Say I have written a test for myBigMethod()... If testSomeOperation() fails, it would also result in testMyBigMethod() to fail... Now testMyBigMethod()'s failure might show a not-so-correct-location of the bug. One-Cause causing two tests to fail doesn't look so good to me. But donno if there's any better way...? Is there ? Thanks !

    Read the article

  • Using a service registry that doesn’t suck part II: Dear registry, do you have to be a message broker?

    - by gsusx
    Continuing our series of posts about service registry patterns that suck, we decided to address one of the most common techniques that Service Oriented (SOA) governance tools use to enforce policies. Scenario Service registries and repositories serve typically as a mechanism for storing service policies that model behaviors such as security, trust, reliable messaging, SLAs, etc. This makes perfect sense given that SOA governance registries were conceived as a mechanism to store and manage the policies...(read more)

    Read the article

  • Agile SOA Governance: SO-Aware and Visual Studio Integration

    - by gsusx
    One of the major limitations of traditional SOA governance platforms is the lack of integration as part of the development process. Tools like HP-Systinet or SOA Software are designed to operate by models on which the architects dictate the governance procedures and policies and the rest of the team members follow along. Consequently, those procedures are frequently rejected by developers and testers given that they can’t incorporate it as part of their daily activities. Having SOA governance products...(read more)

    Read the article

  • We are hiring (take a minute to read this, is not another BS talk ;) )

    - by gsusx
    I really wanted to wait until our new website was out to blog about this but I hope you can put up with the ugly website for a few more days J. Tellago keeps growing and, after a quick break at the beginning of the year, we are back in hiring mode J. We are currently expanding our teams in the United States and Argentina and have various positions open in the following categories. .NET developers: If you are an exceptional .NET programmer with a passion for creating great software solutions working...(read more)

    Read the article

  • Tellago & Tellago Studios at Microsoft TechReady

    - by gsusx
    This week Microsoft is hosting the first edition of their annual TechReady conference. Even though TechReady is an internal conference, Microsoft invited us to present a not one but two sessions about some our recent work. We are particularly proud of the fact that one of those sessions is about our SO-Aware service registry. We see this as a recognition to the growing popularity of SO-Aware as the best Agile SOA governance solution in the Microsoft platform. Well, on Tuesday I had the opportunity...(read more)

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >