Search Results

Search found 65503 results on 2621 pages for 'real application testing'.

Page 30/2621 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Unit Testing Model Classes that inherit from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • Should a Unit-test replicate functionality or Test output?

    - by Daniel Beardsley
    I've run into this dilemma several times. Should my unit-tests duplicate the functionality of the method they are testing to verify it's integrity? OR Should unit tests strive to test the method with numerous manually created instances of inputs and expected outputs? I'm mainly asking the question for situations where the method you are testing is reasonably simple and it's proper operation can be verified by glancing at the code for a minute. Simplified example (in ruby): def concat_strings(str1, str2) return str1 + " AND " + str2 end Simplified functionality-replicating test for the above method: def test_concat_strings 10.times do str1 = random_string_generator str2 = random_string_generator assert_equal (str1 + " AND " + str2), concat_strings(str1, str2) end end I understand that most times the method you are testing won't be simple enough to justify doing it this way. But my question remains; is this a valid methodology in some circumstances (why or why not)?

    Read the article

  • What is wrong with Stubs for unit testing?

    - by MatthewMartin
    I just watched this funny YouTube Video about unit testing (it's Hitler with fake subtitles chewing out his team for not doing good unit tests--skip it if you're humor impaired) where stubs get roundly criticized. But I don't understand what wrong with stubs. I haven't started using a mocking framework and I haven't started feeling the pain from not using one. Am I in for a world a hurt sometime down the line, having chosen handwritten stubs and fakes instead of mocks (like Rhinomock etc)? (using Fowler's taxonomy) What are the considerations for picking between a mock and handwritten stub?

    Read the article

  • Unit Testing Model Classes that derive from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • Testing with Unittest Python

    - by chrissygormley
    Hello, I am runninig test's with Python Unittest. I am running tests but I want to do negative testing and I would like to test if a function throw's an exception, it passes but if no exception is thrown the test fail's. The script I have is: try: result = self.client.service.GetStreamUri(self.stream, self.token) self.assertFalse except suds.WebFault, e: self.assertTrue else: self.assertTrue This alway's passes as True even when the function work's perfectly. I have also tried various other way's including: try: result = self.client.service.GetStreamUri(self.stream, self.token) self.assertFalse except suds.WebFault, e: self.assertTrue except Exception, e: self.assertTrue Does anyone have any suggestions? Thanks

    Read the article

  • AI testing framework

    - by Jon
    I am looking at developing an AI player for a simple game I have created in C#. I will be creating a population of the bots and evolving them over generations. What I was wondering is there any frameworks out there that could be good for this sort of testing / development. Ideally I would like something that I could plug any / some type of games into and say, OK so have a population of X run it over Y generations and chart the results for me. I was having a think about how I would create something that would do this for me and allow me to reuse this later for different AI projects and all I could think of was to have some sort of core code and some interface contracts that the game and AI would use so that the server can script it. What are your thoughts, does anyone have any practical experience of this sort of thing?

    Read the article

  • Unit testing custom controls in Silverlight

    - by Hrvoje
    I have several custom controls (some kind of frames for content and layout management, like wrap panel), and would like to write unit tests for them. It's hard to find any good examples except Silverlight control toolkit, which has some helper classes to do unit tests and it's quite complicated. For MVVM classes it's easy to write tests because they don't use SL dependency system and infrastructure. Questions: how to unit test DepedenyProperty, what do I need to test how to test attached property do I test bindings with theme or UserControl, like simple textblock content binding, or command/event binding in MVVM with UserControl what else do I test in my custom controls, beside my business logic any good tutorial to achieve tests like those in control toolkit How do I start? Is SL controls toolkit only option for learning? For testing framework i'm using one from control toolkit, and for continuus integration on TFS build server I planned to use Statlight (from codeplex). Any advice on that?

    Read the article

  • Replicating Active Directory - testing scenarios

    - by Naeem Sarfraz
    Replicating a production server's Active Directory is possible through a number of approaches as mentioned here and here. I'm looking for a simpler approach if one exists. I have a mixed-mode authentication site that I need to test. Quite simply AD users (internal) will have more privilege's than someone who logs in via forms (external). We have a web service that cache's an AD structure (users & groups). I'm thinking of building a module (http handler I guess?) that will pick up my specially formed URL (http://impersonateduser@localhost/mywebapp) and use the bit before the @ as the username. That will be the username I use for any subsequent operations. How does that sound? Has anyone got other proposals for testing scenarios like this?

    Read the article

  • Unit Testing Model Classes that inherits from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • Shell script for testing

    - by Helltone
    I want a simple testing shell script that launches a program N times in parallel, and saves each different output to a different file. I have made a start that launches the program in parallel and saves the output, but how can I keep only the outputs that are different? Also how can I actually make the echo DONE! indicate the end? #!/bin/bash N=10 for((i=1; j<=$N; ++i)); do ./test > output-$N & done echo DONE!

    Read the article

  • Automated user testing with times

    - by Sean
    I am attempting to test user interaction with an off the shelf product. The current process is to run through a manual script and record how long certain processes take to populate data, it may populate a datagrid, a tree, a list box, etc... It will also need to be able record how long it takes to generate a pdf report. We do not require extremely accurate time just to the nearest second or less than a second. I need to know if there is a simple Automated testing product that will handle the above criteria.

    Read the article

  • Unit testing a controller in ASP.NET MVC 3

    - by Abdullah Al- Mansur
    public Double Invert(Double? id) { return (Double)(id / id); } I have done this for this test but fails please can anyone help with this cos just started with unit testing /* HINT: Remember that you are passing Invert an *integer* so * the value of 1 / input is calculated using integer arithmetic. * */ //Arrange var controller = new UrlParameterController(); int input = 7; Double expected = 0.143d; Double marginOfError = 0.001d; //Act var result = controller.Invert(input); //Assert Assert.AreEqual(expected, result, marginOfError); /* NOTE This time we use a different Assert.AreEqual() method, which * checks whether or not two Double values are within a specified * distance of one another. This is a good way to deal with rounding * errors from floating point arithmetic. Without the marginOfError * parameter the assertion fails. * */

    Read the article

  • Testing on blackberry device - adding and removing app multiple times

    - by Kai
    It would be useful for many people to know how to completely remove an application from your device when testing. I have downloaded my app many times now, and likewise have deleted it many times. The problem is when deleting the app, it does not remove things like the persistent object related to my app, or the images downloaded through the app. So, when I download the next build, I have no idea if something broke that is related to building the persistent object or fetching the images since those elements already exist from the last build. I don't know if this is a cache thing. I don't know if this is expected and I have to use some utility to wipe this data after deleting the app. I can't really find much info through basic web searches. Any information would be appreciated. Blackberry Bold 9000. 4.6 OS. tested with both SD card and no SD card.

    Read the article

  • C# Unit Testing - Generating Mock DataContexts / LINQ -> SQL classes

    - by gav
    Hi All, I am loving the new world that is C#, I've come to a point with my toy programs where I want to start writing some unit tests. My code currently uses a database via a DatabaseDataContext object (*.dbml file), what's the best way to create a mock for this object? Given how easy it is to generate the database LINQ - SQL code and how common a request this must be I'm hoping that VS2010 has built in functionality to help with testing. If I'm way off and this must be done manually could you please enlighten me as to your preferred approach? Many Thanks, Gavin

    Read the article

  • Testing a quadratic equation

    - by user1201587
    I'm doing a code testing for a program that calculate the results for a quadratic equation I need to have test data for the following situation, when a is not zero and d positive there is two possibilities which are in the code below, I need to find an example for the first satiation when Math.abs(b / a - 200.0) < 1.0e-4 , all the values that I have tried, excute the second one caption= "Two roots"; if (Math.abs(b / a - 200.0) < 1.0e-4) { System.out.println("first one"); x1 = (-100.0 * (1.0 + Math.sqrt(1.0 - 1.0 / (10000.0 * a)))); x2 = (-100.0 * (1.0 - Math.sqrt(1.0 - 1.0 / (10000.0 * a)))); } else { System.out.println("secrst one"); x1 = (-b - Math.sqrt(d)) / (2.0 * a); x2 = (-b + Math.sqrt(d)) / (2.0 * a); } } }

    Read the article

  • Unit testing with Data Access Layer

    - by chobo
    Hi, what is a good way to write unit tests with a LINQ to SQL DAL? Currently I am doing some database testing and need to create helper methods that access the database, but I don't want those methods in my main repo's. So what I have is two copies of the DAL, one in my main project and one in the Test project. Is it easier to manage these things if I create a separate project for the data layer? I'm not sure which way is a better way to approach this. If I do create a data layer project would I move all my repo's to that project as well? I'm not sure how to properly setup the layers. Thanks

    Read the article

  • Testing an app on the device

    - by DailyDoggy
    Hi there! For some reason i cant test my apps on a real iphone anymore. My license is valid the device has a profile, but something just doesn't seem to work... I think i'm doing something wrong but i don't know what exactly... the App Id, the Profile?? Can you please list me all the steps of testing an app? before i could do it myself but now i just don't get it anymore... Any ideas or suggestions?

    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

  • unit testing methods with arrays as argument

    - by Ryan
    I am porting over some C++ assembly to VB that performs demodulation of various waveforms. I decided to go the unit test route instead of building a test app to get a feel for how testing is performed. The original demodulation code accepts an array that is the waveform along with some other arguments. How should one go about performing a test on something that has an array as an argument? Is it acceptable to generate fake data in a file and read it in at the beginning of the test? On a side note - The original C++ code was written because we were performing math that we couldn't do in VB6 so we had to cross boundaries between C++ and VB6 and arrays were used. Is there a "better" way of handling large amounts of data in the .NET world that us VB6 programmers may not yet be privy to? Or if we aren't crossing that managed/un-managed boundary, should we be representing our data as objects instead? Thanks all!

    Read the article

  • Performance Testing a .NET Smart Client Application (.NET ClickOnce technology)

    - by jn29098
    Has anyone ever had to run performance tests on a ClickOnce application? I have engaged with a vendor who had trouble setting up their toolset with our software because it is Smart Client based. They are understandably more geared toward purely browser-based applications. I wonder if anyone has had to tackle this before and if so would you recommend any vendors who use industry standard tools such as Load Runner (which i assume can handle the smart client)? Thanks

    Read the article

  • Choosing an automated testing tool

    - by pal25
    My project is compatible only with Internet Explorer. I want the test scripts to get generated automatically as it is done in Selenium IDE. Can i use Selenium RC to test my application? I could not use Selenium IDE as it can be used only with Mozilla Firefox.

    Read the article

  • Null reference to DataContext when testing an ASP.NET MVC app with NUnit

    - by user252160
    I have an ASP.NET MVC application with a separate project added for tests. I know the plusses and minuses of using the connection to the database when running unit tests, and I still want to use it. Yet, every time when I run the tests with the NUnit tool, they all fail due to my Data Context being null. I heard something about having a separate config file for the tests assembly, but i am not sure whether I did it properly, or whether that works at all.

    Read the article

  • Flex Unit testing of library and mxml using FlexUnit

    - by user344722
    Hi, I have some software classes(library) to run commands on any mxml file. These classes(library) are wrapped in a SWC file. This SWC file is referenced by any sample mxml application (by adding as SWC file). My problem is that I want to test these software classes(library) against my sample mxml file using FlexUnit. That is, I should test methods run by software classes on the mxml file. How can I accomplish this? Thanks, Pradeep

    Read the article

  • beta testing iphone & ipad applications

    - by John Stewart
    I want to roll a beta test session for my iphone and ipad application with general public. Want to get some feedback before officially launching the app. Does anyone know of a a good community that I can tap into? I found http://ibetatest.com via google but not sure how good/bad it is?

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >