I'm curious what a reasonable / typical value is for the ratio of test code to production code when people are doing TDD. Looking at one component, I have 530 lines of test code for 130 lines of production code. Another component has 1000 lines of test code for 360 lines of production code. So the unit tests are requiring roughly 3x t...
We have a ton of developers and only a few QA folks. The developers have been getting more involved in qa throughout the development process by writing automated tests, but our QA practices are mostly manual.
What I'd love is if our development practices were BDD and TDD and we grew a robust test suite. The question is: While building s...
Hi All,
I am looking for one of 2 things, Test Driven Development, or Architecture Trainings on the West Coast.
If anyone knows a company that do those, I would really apreciate it.
Thanks
...
This is probably crazy.
I want to take the idea of Dependency Injection to extremes. I have isolated all System.IO-related behavior into a single class so that I can mock that class in my other classes and thereby relieve my larger suite of unit tests of the burden of worrying about the actual file system.
But the File IO class I end u...
In VisualStudio2010 Ultimate RC
I cannot figure out how to suppress
{"CollectionAssert.AreEqual failed. (Element at index 0 do not match.)"}
from
Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException
If i Ctrl+Alt+E I get the exception dialog; however that exception doesn't seem to be in there to be suppressed. Does ...
I've spent most of my time in statically typed languages (primarily C#). I have some bad experiences with the Active Record pattern and unit testing, because of the static methods and the mix of entities and data access code.
Since the Ruby community probably is the most test driven of the communities out there, and the Rails ActiveReco...
Our team is willing to unit-test a new code written under a running project extending an existing huge Oracle system.
The system is written solely in PL/SQL, consists of thousands of tables, hundreds of stored procedures packages, mostly getting data from tables and/or inserting/updating other data.
Our extension is not an exception. M...
I know I wouldn't need this with Typemock, however, with something like MoQ , I need to use the adapter pattern to enable the creation of mocks via interfaces for code I don't control.
For example, TcpClient is a .NET class, so I use adapter pattern to enable mocking of this object, b/c I need an interface of that class. I then produce...
I'm trying out mock/responsibility driven design. I seem to have problems to avoid returning mocks from mocks in the case of objects that need a service to retrieve other objects.
An example could be an object that checks whether the bills from last month are paid. It needs a service that retrieves a list of bills. So I need to mock tha...
Hey guys,
I am writing some unit tests and I'm getting an exception thrown from my real code when trying to do the following:
string IPaddress = HttpContext.Current.Request.UserHostName.ToString();
Is there a way to mock up an IP address without rewriting my code to accept IP address as a parameter?
Thanks!
...
I'm just getting started with TDD and am curious as to what approaches others take to run their tests. For reference, I am using the google testing framework, but I believe the question is applicable to most other testing frameworks and to languages other than C/C++.
My general approach so far has been to do one of three things:
Write...
I'm using HSQLDB for data layer integration testing, which is great. However, I'm finding that my foreign key constraints are getting in the way of my tests. For example, to test a simple select on one table, I have to insert dummy data into five additional tables. This makes me want to throw things.
I have JPA annotations throughout...
I have inherited a large and firaly complex state machine at work.
It has 31 possbile states to be in.
It has the following inputs:
Enum: Current State (so 0 -> 30)
Enum: source (currently only 2 entries)
Boolean: Request
Boolean: type
Enum: Status (3 states)
Enum: Handling (3 states)
Boolean: Completed
The 31 States are really nee...
So I am wondering if anyone is familiar or has done any work with cucumber and Silverlight. I currently have a template directory and build file that will create RSpec tests using Bacon (light weight RSpec). I have been looking into SpecFlow and Cuke2Nuke but almost everything I have seen works with general .net code not silverlight co...
I am looking for TDD resources that are specific to Rails.
I've seen the Rails Guide: The Basics of Creating a Rails Plugin which really spurred my interest in the topic.
I have the Agile Development with Rails book and I see there's some testing-related information there. However, it seems like the author takes you through the steps o...
Hi all,
I'm trying to build a test for a view that's decorated with
@login_required, since I failed to make it work, I did a simple test
and still can't make it pass.
Here is the code for the simple test and the view:
def test_login(self):
user = self._create_new_user()
self.assertTrue(user.is_active)
login = self.client.l...
I will start a project that needs a web and desktop interface. One solution seems to be IdeaBlade (http://www.ideablade.com).
Can anyone who uses it describe its limitations and advantages? Is it testable?
Thanks,
Alex
...
Hello,
I'd like to start with TDD in ASP.NET NVC. Getting links pointing me to some ressources for absolute beginners on that matter would be helpfull. (why, when, how to write tests).
Also, some advices on how to tackle the subject are welcomed.
Thanks for helping
...
Hi,
I would like to know what's the best approach to test the method "pushEvent()" in the following class with a jUnit test.
My problem is, that the private method "callWebsite()" always requires a connection to the network. How can I avoid this requirement or refactor my class that I can test it without a connection to the network?
c...
Are there any guidelines when quoting estimates for projects/tasks involving TDD?
For example, when compared to normal development of a task taking 1 day to complete, how much more should a TDD driven task take? 50% more time or 70% more time? Are there any statistics available, assuming the developer is well versed with the language an...