Questions tagged [testing-strategies]

44 questions
97
votes
18 answers

What Makes a Good Unit Test?

I'm sure most of you are writing lots of automated tests and that you also have run into some common pitfalls when unit testing. My question is do you follow any rules of conduct for writing tests in order to avoid problems in the future? To be…
Spoike
  • 119,724
  • 44
  • 140
  • 158
56
votes
8 answers

Is there a difference between TDD and Test First Development (or Test First Programming)?

Both ideas sound very similar to me, but there might be subtle differences or the exact same thing, explained in different ways. What is the relationship between TDD and Test First Development/Programming?
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
34
votes
21 answers

What not to test when it comes to Unit Testing?

In which parts of a project writing unit tests is nearly or really impossible? Data access? ftp? If there is an answer to this question then %100 coverage is a myth, isn't it?
spinodal
  • 4,007
  • 3
  • 29
  • 38
26
votes
9 answers

Test Automation with Embedded Hardware

Has anyone had success automating testing directly on embedded hardware? Specifically, I am thinking of automating a battery of unit tests for hardware layer modules. We need to have greater confidence in our hardware layer code. A lot of our…
JeffV
  • 52,985
  • 32
  • 103
  • 124
16
votes
0 answers

How to test on Live paypal site with dummy credit cards

Right now I am able to test credit card functionality on development server using test/dummy credit cards. But not able to test the same functionality on live server. Are there any dummy credit cards, with which we can test the same on live site?
pallavi
9
votes
3 answers

Difficulty Approaching Test Driven Development in AngularJS using Jasmine and Karma

I'm having difficulty getting started with test driven development in AngularJS using the Jasmine testing framework. I've had ample experience using PHPUnit and am very comfortable with it. Though I have not found the same ease doing test driven…
BrightIntelDusk
  • 4,577
  • 2
  • 25
  • 34
7
votes
2 answers

What are tools and best practices for testing web services?

I'm about to start work on a large project that will involve providing a significant number of web services. We'll be using the Java platform, so, of course, we'll be making heavy use of JUnit, Hudson, etc. (although I'm not sure that matters at…
Jared
  • 25,520
  • 24
  • 79
  • 114
5
votes
5 answers

How Much Should Each Unit Test Test?

How much should each of my unit tests examine? For instance I have this test [TestMethod] public void IndexReturnsAView() { IActivityRepository repository = GetPopulatedRepository(); ActivityController activityController =…
stimms
  • 42,945
  • 30
  • 96
  • 149
5
votes
2 answers

What is the most accurate method of estimating peak bandwidth requirement for a web application?

I am working on a client proposal and they will need to upgrade their network infrastructure to support hosting an ASP.NET application. Essentially, I need to estimate peak usage for a system with a known quantity of users (currently 250). A simple…
paulwhit
  • 8,719
  • 4
  • 29
  • 30
5
votes
5 answers

Introducing Test Driven Development in PHP

My workplace consists of a lot of cowboy coders. Many of them are junior. Which coincidentally contributes to a lot of code quality issues. I'm looking for suggestions on how to best wane my team into using TDD (we can start with Unit tests, and…
chadl
  • 195
  • 1
  • 7
5
votes
4 answers

How do you unit test a class that's meant to talk to data?

I have a few repository classes that are meant to talk to different kinds of data, deriving from an IRepository interface. In implementations, the code talks to a data source, be this a directory of XML files or a database or even just a cache. Is…
Arda Xi
  • 2,616
  • 3
  • 19
  • 24
4
votes
2 answers

What are the first tasks for implementing Unit Testing in Brownfield Applications?

Do you refactor your SQL first? Your architecture? or your code base? Do you change languages? Do you throw everything away and start from scratch? [Not refactoring]
4
votes
10 answers

Tips for finding things in your program that are broken that you don't know about?

I was working on something for a client today when I found a way to break some functionality in our program. (The code is really legacy code, it's been in development for about 10 years and I've only been working here for about a year.) It didn't…
leeand00
  • 25,510
  • 39
  • 140
  • 297
4
votes
6 answers

Is there a right way to implement a continuous improvement (AKA software hardening) process?

Each release it seems that our customers find a few old issues with our software. It makes it look like every release has multiple bugs, when in reality our new code is generally solid. We have tried to implement some additional testing where we…
4
votes
8 answers

Self Testing Tips?

Basically I'm wondering if anyone has any tips for ensuring your code is well tested without getting any help from anyone else in a limited time frame? In the past I've always been able to find someone else to do testing on my code or had a…
Jai
  • 366
  • 2
  • 8
1
2 3