I want to improve the roundtrip time when doing TDD. I guess the total compile time for the solution will be longer, but that is not important.
Background:
When I watch the output window during compiling when I wait for my unittest to run, I see that some time is spent only verifying that depended projects does not need to be build.
St...
How to write first end-to-end automated test for NetBeans Platform Application on Java (not just capture & replay) which suppose run the application and test if click on the Main Menu -> File -> Exit menu item will close it?
Given: installed jdk1.6.0_17 and apache-maven-2.2.1
Then:
mvn archetype:generate -DarchetypeGroupId=org.codehau...
I'm having a hard time understanding why there is only one test per function in most professional TDD code that I have seen. When I approached TDD initially I tended to group 4-5 tests per function if they were related but I see that doesn't seem to be the standard. I know that it is more descriptive to have just one test per function be...
I wanted to start a discussion about the details that you cover in your unit tests.
Do you test major functionalities, that consist of several methods doing one task at once with one test?
or maybe you even test automatic properties?
Because, for example, I see little value in writing a test that would test only this:
public Email
...
Hello!
Is it worth to write unit-tests for such the simple code:
public class TableController {
private TableView view;
public TableController(TableView view) {
this.view = view;
}
public void onShowTable() {
view.showTable();
}
}
I have a lot of such very simple code in my projects which connects controllers, vie...
I understand that the "NUnit vs. MSTest" question has been asked alot on SO. However, I have a simple question that I think hasn't been answered directly.
I am new to TDD, and I know that both have their pro's and con's, however I want to know from a simplicity point of view which would be easier, MSTest or NUnit?
I have no preconceive...
Is there a way to mock/fake the session object in ASP.Net Web forms when creating unit tests?
I am currenclty storing user details in a session variable which is accessed by my business logic.
When testing my business logic, in isolation, the session is not available. This seems to indicate a bad design (though im not sure). Should the...
There a lot of questions very similar to this. Please read before you decide it is a duplicate.
I have seen several people suggest that TestDriven.NET will help my slow MSTest woes. Most of them point to the ability to run a single test easier.
I have resharper which can run a single test easily.
So my question is, does TestDriven.N...
Hi all,
I have a good grasp of unit testing, DI, mocks, and all the design principal goodness required to have as close to full code coverage as humanly possible (single responsibility principal, think 'how will i test this' as I code, etc...).
My most recent app, I did not code doing true TDD. I kept unit-testing in mind as I coded, a...
edited: followed suggestions. See at end of question.
I have a controller with two functions:
def new
if login_required
@discussion = Discussion.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @discussion }
end
end
en...
I just got started with F#, which is my first functional language. I have been working quasi-exclusively with C#, and enjoy a lot how F# leads me to re-think how I write code. One aspect I find a bit disorienting is the change in the process of writing code. I have been using TDD for years in C# now, and really appreciate to have unit te...
I must admit that I often struggle with practising Test-Driven Development. In spite of using Ruby on Rails which makes TDD super easy because it's baked-in, I find writing tests to be so boring! It's like dental flossing; I know that I should do it but struggle to muster much enthusiasm.
What techniques do you use to make writing test...
hi guys,
our dev team is currently using asp.net 2.0 and after a lot of browsing and cross site referencing i found that the new in thing is the asp.net MVC but found that there's a few things that it can't do such as support asp.net controls, view state.
i'm not sure what are the other limitation besides the total change of paradigm w...
Hi, all.
I have read a lot of essays talking about benifits TDD can bring to a project, but I have never practiced TDD in my own project before.
Now I'm starting an experimental project with Django, and I think maybe I can have a try of TDD.
But what I find now is that I don't even know how to answer the question "what should I put in...
running with grails 1.1.1
package ssmithstone
class MyController {
def index = { }
def list = {
withFormat{
json{
render(contentType:"text/json"){
success(true)
}
}
}
}
def info = {
withFormat{
json{
render(contentType:"text/json"){
success(true)
...
First let me just state that coding without unit testing is just plain crazy. Without unit tests I'm living in constant fear of breaking something without noticing. So I'm all for unit testing, and I prefer doing it using TDD.
My question however is; when should you introduce unit tests when starting a new project? Living in the spirit...
I want to write a gsp file that takes a domain object and generates KML. I want to verify that specific elements are present depending on the domain object contents. How would I TDD this gsp file? I was thinking about writing a test that called the render method with a domain object but not sure how to call the render method from outs...
Where do you put unit tests for private functions in C# classes?
An article in Wikipedia suggests:
Putting tests in the same class as the members they're testing
Using partial classes
Personally, neither of these methods seem appropriate, and I much prefer to have unit tests located in a separate project altogether.
Any thoughts on...
I'm looking to enhance our current test suites, and continuous integration builds with full stack integration/acceptance testing.
I'm looking into tools like Culerity and Selenium that can execute front end javascript while running user stories. I'm looking for something that can provide coverage of front-end javascript and high level ...
Hello,
So in my domain I have 3 objects. User, Item and Tag. Each user has items and tags, each item has tags and each tag has items.
The objects look a little like this:
public class User
{
public List<Item> Items { get; set; }
public List<Tag> Tags { get; set; }
}
public class Item
{
public List<Tag> Tags { get; set; }
...