Tagged Questions

A unit is the smallest testable part of an application. In procedural programming, a unit may be an individual function or procedure. Unit tests are created by programmers or occasionally by white box testers.

learn more… | top users | synonyms

6
votes
5answers
86 views

Unit-testing of inherently random/non-deterministic algorithms

My current project, succinctly, involves the creation of "constrainably-random events". I'm basically generating a schedule of inspections. Some of them are based on strict schedule constraints; you ...
1
vote
1answer
95 views

Testing an IRC Bot

I'm using Autumn gem to create a Ruby IRC bot for a game. However, it makes me feel rather embarrassed because I don't know how to test this kind of program... I think I should mock the IO process to ...
7
votes
3answers
133 views

Is there a unit testing framework for HTML markup?

I work at a web design shop. Our workflow is divided into two parts: frontend programmers make static html and css templates of the site design, then backend programmers tie the templates into a CMS. ...
1
vote
2answers
206 views

Is it a good idea to use an unit test framework for another purpose than test code?

I'm about to write a simple script to test a dataset for certain conditions. I was designing it as a set of functions each one describing the condition to be tested and pass them to the test engine: ...
8
votes
2answers
193 views

What should I be looking for when evaluating unit testing libraries and tools?

I'm in the process of choosing new unit testing tools for soon to be started project. There are plenty of them! The basic requirements I have would be that it can run tests on at least Windows and ...
258
votes
12answers
5k views

Should I intentionally break the build when a bug is found in production?

It seems reasonable to me that if a serious bug is found in production by end-users, a failing unit test should be added to cover that bug, thus intentionally breaking the build until the bug is ...
9
votes
5answers
284 views

Should we test all our methods?

So today I had a talk with my teammate about unit testing. The whole thing started when he asked me "hey, where are the tests for that class, I see only one?". The whole class was a manager (or a ...
2
votes
3answers
82 views

Is the MIT license suitable for an open source library that is only used in unit testing scenarios?

Some time ago I developed a small project for use in unit testing scenario's and published it on Codeplex. Back then I choose the GPL license but I didn't really understand it. Today I changed it to ...
6
votes
7answers
428 views

Should I pass an object into a constructor, or instantiate in class?

Consider these two examples: Passing an object to a constructor class ExampleA { private $config; public function __construct($config) { $this->config = $config; } } $config = new ...
9
votes
4answers
115 views

Is it a good idea to measure the performance of a method by using unit test timeout?

In a project where there are non-functional requirements which specify the maximum execution time for a specific action, QA must check the performance of this action on a dedicated machine using ...
10
votes
3answers
294 views

What is the relevance of Unit Testing in an “Release early release often” environment?

Over last one year or so, I have driven my team towards the release-early-release-often mode of development (AKA: Rapid Application Development, not Agile). For more information about the manner in ...
5
votes
2answers
156 views

Write Unit test for heavily-database application?

I'm currently developing a Spring-based web-application, in which almost every operation create/update/delete something in the database. The logic mostly about checking condition so as to we should ...
3
votes
2answers
248 views

Never written much unit tests, how can I practice more of it?

I have an interview coming up soon next week and there's a few things on their list of responsibilties for this software development job (the job position title is vague, it says java developer) that ...
36
votes
6answers
2k views

Should unit tests be stored in the repository?

I'm a growing programmer who's finally putting unit testing into practice for a library that I'm storing on GitHub. It occurred to me that I might include the test suites in the repo, but as I look ...
7
votes
1answer
86 views

I've unit tested my class, now how do I get started with an integration test?

I've written a class that manages recipients on a MailChimp list, called MailChimpRecipient. It uses the MCAPI class, which is an third-party API wrapper. http://apidocs.mailchimp.com/api/1.3/ ...

1 2 3 4 5 16
15 30 50 per page