¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date   
[TDD] Testing Views - iOS 5
Can¡¯t you just screen scrape the views, given that they are supposed to drive the screen?
Started by Amir Kolsky @ · Most recent @
Testing Views - iOS
I've essentially broken my GUI logic out into a rough MVP pattern and while I find testing the Models and Presenters straightforward, I haven't come up with a repeatable process to test drive the code in the Views. Granted, my views are dumb and have no real business logic - but for instance, if something is disabled, I could test that certain fields are set to 'readonly', or greyed out, etc. I generally use mocks and inject dependencies everywhere else in the app - but that isn't as feasible in the views. Buttons, toggles and segemented controls aren't something the parent view can just swap out, replace and layout correctly. Injection doesn't feel right and so, because Views are so 'self contained' - I find myself newing child components up inside of their parent views and as such, I'm not sure how to TDD them without exposing their internals somehow. Would great appreciate some suggestions. Thanks, -Luther
Started by Luther Baker @
[TDD] Testing Searcher Object 3
How many ways are there for it to go right? I can see a null response, a single return, multiple returns. Can it get duplicates? What other results are "happy" paths? How many ways are there for it to go wrong? An invalid search? A backend that isn't working? An invalid input? what? What else? Remember, you're testing the SEARCHER OBJECT not every possible search, or the system behind it. -- Tim Ottinger, Sr. Consultant, Industrial Logic ------------------------------------- http://www.industriallogic.com/ http://agileinaflash.com/ http://agileotter.blogspot.com/
Started by Tim Ottinger @ · Most recent @
[TDD] Testing Searcher Object
Eb, Remember, the point of TDD is more to drive the design than to "test properly." That said, I wouldn't ever expect to test all permutations of something with a lot of permutations. I would check each input separately. If you want to go further, you might look at pair-wise permutations, and perhaps one or two "complicated" searches for peace of mind. - George -- ---------------------------------------------------------------------- * George Dinwiddie * http://blog.gdinwiddie.com Software Development http://www.idiacomputing.com Consultant and Coach http://www.agilemaryland.org ----------------------------------------------------------------------
Started by George Dinwiddie @
[TDD] Testing Searcher Object
Can you give us an example of a search? Or a few examples?
Started by Amir Kolsky @
[TDD] Testing Searcher Object
Eikonne, I¡¯d probably start like this (and then let the code take me): - Set up a failing test which is an interesting combination of input categories - To get that passing, for each category set up tests which get a hit if a search target is there, and no hit if a search target is not there. - Some examples of multiple hits - My first test is green yet? I would not be trying for all combinations, but I¡¯d likely be looking for edge cases. And wondering if categories can overlap. John D.
Started by Donaldson, John @
Testing Searcher Object
Hi - We were having a conversation about testing a "searcher" object. Basically, this object does a search based on the inputs passed into it. Do tests have to be written for every permutation of inputs for the class to have been tested properly? Thanks. -- blog: http://eikonne.wordpress.com twitter: @eikonne
Started by Eb Alson @
[TDD] Unit testing in C++11 2
Good! :) 2013/7/25 Joakim Karlsson <joakim@...> -- Osias, o Osias [Non-text portions of this message have been removed]
Started by Osias Jota @ · Most recent @
[TDD] Re: Open Source Project Survey
?Simple, you post here, I see it, I ask you to write an article. You sit down and write it in 2-3 days. You win everlasting fame :-) Seriously some fairly good gigs over the years cite articles I wrote as the reason they hired me. Cheers Mark ?-- Mark Levison | 1 (877) 248-8277 | Twitter | LinkedIn | Facebook Certified ScrumMaster Training: Vancouver | Edmonton | Ottawa | Montreal | Toronto Agile Pain Relief Consulting | Notes from a Tool User Proud Sponsor of Agile Tour Gatineau Ottawa and Agile Coach Camp Canada
Started by Mark Levison @
Open Source Project Survey
Hi, Mark - Keep up the fight, TDD needs some more high qualitystudies. Not sure where my research may fit in but if something interestingcomes out of it I may send it your way :) Steven - A good idea, I'd imagine it might turn out to be alittle tricky in practice - at least given my time constraints. A considerationfor another project though. Cheers, Keith.
Started by fogarty_keith@... @
[TDD] Open Source Project Survey 4
Contact Keith Braithewaite he reviewed a number of open source projects that were done test first, last, not at all. His conclusions are quite interesting. Cheers Mark -- Mark Levison | 1 (877) 248-8277 | Twitter | LinkedIn | Facebook Certified ScrumMaster Training: Vancouver | Edmonton | Ottawa | Montreal | Toronto Agile Pain Relief Consulting | Notes from a Tool User Proud Sponsor of Agile Tour Gatineau Ottawa and Agile Coach Camp Canada
Started by Mark Levison @ · Most recent @
[TDD] Examples of Pojo Free Code? 5
Mark, I don't have any examples to show, but a pattern I've used successfully is to encapsulate the "data object" within a business domain object. Typically I've used the data object as a parameter to the domain object consctructor, and provided a getter for when (if) I needed to recover the primitive for some reason. Often the user (ORM in this case) doesn't actually need a data-only object, anyway. It just needs some bean-pattern getters and setters for the fields it's to understand. - George -- ---------------------------------------------------------------------- * George Dinwiddie * http://blog.gdinwiddie.com Software Development http://www.idiacomputing.com Consultant and Coach http://www.agilemaryland.org ----------------------------------------------------------------------
Started by George Dinwiddie @ · Most recent @
[TDD] Examples of Pojo Free Code? 3
There's nothing about the ORM that forces them to use data classes. The framework typically requires you to follow some conventions and/or configure some options so that it knows how to match types. Also, you typically have to provide a no-arg constructor so that it can instantiate objects for you. Otherwise, they call them "plain old java objects" for a reason. They can and should have behavior. My advice would be the same as for any heavy framework use: 1) YAGNI? 2) Test-drive a wrapper around the framework APIs you intend to use so that you can reference them directly in only a couple of places. It blows my mind why more people don't do this. 3) Use a gradual changeover or parallel change strategy to move current uses of the framework to the new wrapper. This could take months or years to fully complete depending on how large and complex the legacy code is. Prioritize new functionality and/or areas that have caused you difficulty in the past. Beyond that, it sounds like there is a interesting cultural/educational problem. I would want to investigate to understand why they believe something that is clearly false: ORMs force them to write poorly factored and/or non-OO code. This is simply not the case. For example, Industrial Logic uses Hibernate in their eLearning product code (written in Java) and there are plenty examples of well factored classes in there. I have also run into a tendency to: a) copy contrived examples from the ORM documentation that needlessly couple you to the framework then blame the framework. b) misinterpret some design book as suggesting these are ORM "best practices." For example, Domain Driven Design, by Eric Evans, seems to be misinterpreted as saying that persistent "Entities" are just data and "Services" operate on that data. He describes both of these patterns but never says that they should be implemented that way. If you convince yourself that all the behavior belongs in static services (libraries) and all the data belongs in data classes (structs) then you should really be writing in C. That's not a knock on C. I love C. Java was designed for a different paradigm, though, and if you are going to work with it professionally you should know what that is.
Started by Adam Sroka @ · Most recent @
[TDD] Examples of Pojo Free Code? 4
Mark, I am pretty much in agreement with you. (Struggling with a legacy Toplink app at the moment, Hibernate before that). But, don¡¯t forget that an ORM framework is also providing you with other useful stuff around sessions, multi-user access, one-many/many-one/many-many mappings, error handling, transactions and so on. John D.
Started by Donaldson, John @ · Most recent @
Open Source Project Survey
Hi, I was hoping you may be able to help. I'm working on a MSc. thesis and am looking to identify Open Source Test-First and Test-Last projects for a research experiment. To this end I was hoping that anyone who has contributed to a Java open source project (and has some overall knowledge of the project) could fill out the attached (short, 12 questions) survey for that project? My research will look at Design Pattern Usage in Test-First and Test-Last projects and I will post a link here to my research when finished. Also (as far as I can see) it's been a little while since the last 'What projects are Test-Driven?' request in this group - by way of updating this information I can post the survey findings here (for java projects anyway). Of course if you prefer your project not be identified there is a privacy option on the survey. Thanks in advance for your help, Keith Fogarty. Link to the survey: Open Source Software Project Survey Open Source Software Project Survey Hi, I was hoping you may be able to help me. I'm currently working on an M.Sc. Thesis and require a number of Test-First and Test-Last subject projects as part o... View on docs.google.com Preview by Yahoo
Started by Keith Fogarty @
Examples of Pojo Free Code?
I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this. Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes? BTW I'm asking on this list lacking a better place. Cheers Mark -- Mark Levison | 1 (877) 248-8277 | Twitter | LinkedIn | Facebook Certified ScrumMaster Training: Vancouver | Edmonton | Ottawa | Montreal | Toronto Agile Pain Relief Consulting | Notes from a Tool User Proud Sponsor of Agile Tour Gatineau Ottawa and Agile Coach Camp Canada
Started by Mark Levison @
[TDD] How to TDD JavaScript so it thinks it is in a browser. 4
Have you tried webdriver + phantomjs? --- Nayan Hajratwala ... @nhajratw ... 734.658.6032 ... http://agileshrugged.com
Started by Nayan Hajratwala @ · Most recent @
Testing a class which utilizes randomness
Hello! Thanks everyone for your replies. Like I said, I'm not testing the RNG (or RSG in this case), but rather the algorithm which deals with duplicates. I'll go with what David and John suggested, writing a class to generate unique random strings and injecting a random string generator. Interesting how a TDD approach resulted in code being organized properly. If I hadn't used it, I'd probably have written a method that used an embedded random string generator and would never have given the problem a second thought. Thanks for the help, Nikola
Started by reasonsharp@... @
[TDD] How to TDD JavaScript so it thinks it is in a browser.
There are a bunch of different ways to do it. I recommend Jasmine as a test framework. It has a fluent, RSpec-like syntax and is decoupled from its runner enough to run almost everywhere (There are dozens of other frameworks and tools that play nice with it.) You can use something like jsdom or one of a number of alternatives to stub out a dom and verify code that runs against it. Those run ridiculously fast on Node.js and are a good first pass for basic correctness. However, you are still going to want to have a few integration tests to make sure that critical things do run in the various browsers. You also want to decouple your domain logic from your dom manipulation. This is exactly the same as in any other OO language. The language in your code should be about what the user is trying to accomplish and details about the dom manipulation should be in small composed methods underneath that.
Started by Adam Sroka @
How to TDD JavaScript so it thinks it is in a browser.
Hi all, How can I set up some programmed tests to test JavaScript, so it thinks its in a browser? The JavaScript code modifies the style objects and the DOM. Have tried various utilities that claim to test JavaScript in the browser, and they have proved impractically slow. (A paste of a 25 character string took over 3 minutes!) So I guess the JavaScript has to be run elsewhere (WSH?) and made to think it is in a browser, but I have no ideas how to do this. I can use Windows or Linux - (No mac :( ). Thanks Ian
Started by Ian @
Current Image
Image Name
Sat 8:39am