Verifying the behavior of a software system against the expected behavior of that system.

learn more… | top users | synonyms

1
vote
2answers
602 views

Should I unit test my subclasses or my abstract parent class?

I have a skeletal implementation, as in Item 18 from Effective Java (extended discussion here). It is an abstract class that provides 2 public methods methodA() and methodB() that call subclasses ...
7
votes
2answers
285 views

Can I check the existence of an annotation in an unit test?

I have a java class hierarchy that are formed by an Abstract class and N extensions of it. In the abstract class I have a method that is annotated with a @Remove annotation. While we won't get any ...
4
votes
1answer
90 views

Testing of a layered software architecture

I am currently building an application with a layered architecture in C. Currently, I have built and tested the bottom layer, which is a networking module, providing functionality such as connecting/...
1
vote
1answer
54 views

What is the preferred way of preparing data in automatic testing

Lets say I want to test a method of a class representing a user account. I have a fixture which contains several user records from which I want to choose one. What is the preferred method here? Pick ...
4
votes
5answers
173 views

Include Testers inside the Team or Create a Tests Area? [closed]

I've become a leader of a group of 30 developers. We run Scrum and we have different teams for each Product Backlog. We have no testers across the teams and I'd like add them. My main question is: ...
1
vote
2answers
185 views

Ways of creating expected object for assert

Recently, I started to use TDD. It's really cool and fun but creating expected object for assertEquals is very boring and tedious. At the moment I see only two way for that: Straightforward Creating ...
1
vote
1answer
534 views

How does branch coverage handle loops?

I know how code coverage works in general, and I know what branch coverage is. But I can not seem to find an explanation for how branch coverage handles loops. Does it work like path coverage? Where ...
178
votes
9answers
17k views

Is it normal to spend as much, if not more, time writing tests than actual code?

I find tests a lot trickier and harder to write than the actual code they are testing. It's not unusual for me to spend more time writing the test than the code it is testing. Is that normal or am I ...
5
votes
1answer
177 views

How can I best test a multithreaded C producer-consumer program? [closed]

How does one best write tests for a multi-threaded producer-consumer C program? I know GDB can be used to debug threads, but I believe GDB also stops the thread currently being debugged while other ...
3
votes
1answer
188 views

How to write a simplistic functional test plan?

I was given an assignment and it is fairly simple, just a special type of search for a special type of objects. However, I was told to implement a set of functional tests and also provide a 1 page ...
0
votes
0answers
55 views

Unit testing and testing null value [duplicate]

I m actually studying unit testing and I was wondering if testing null value is good or not in every functions / method of my app. Admitting that we're working on javascript and that I have a ...
5
votes
3answers
749 views

How to test code that depends on complex APIs (Amazon S3 for instance)?

I am struggling with testing a method that uploads documents to Amazon S3, but I think this question applies to any non-trivial API/external dependecy. I've only come up with three potential solutions ...
1
vote
0answers
204 views

ASP.Net MVC - Implementing a Test Environment

I would like to implement some sort of test environment for ASP.Net projects. I am trying to implement this as an alternative to mocking the entity framework. Here is what I am trying to achieve : ...
33
votes
6answers
4k views

How do I test a system where the objects are difficult to mock?

I am working with the following system: Network Data Feed -> Third Party Nio Library -> My Objects via adapter pattern We recently had an issue where I updated the version of the library I ...
2
votes
1answer
173 views

TDD/BDD - Properly defining tests, adjusting tests, putting describe blocks inside it blocks

I am coming around with TDD/BDD. I am a bit confused though, when it comes to initially writing my BDD tests and then adding more tests after the very broad tests. For Example, lets say that I am ...
3
votes
2answers
216 views

Writing your test assertions in your function comments (just before the code)?

I'm using PHP and PHPUnit. Something bothers me: the fact that the assertions are in another class (too easy to forget or to ignore, for any new programmer in the project). If the test assertions ...
0
votes
1answer
229 views

Problems in QA Environment [duplicate]

At least few times a week I have to track down a bug that would not occur in a production\client environment. 95% of the time I can tell that its a QA configuration\environment problem just by looking ...
0
votes
1answer
74 views

End to end testing of write-only apis

In our deployment process for our services, besides unit and integration tests, we also have a little smoke test for our services. Mostly for verifying that the deployment went well, cloud services ...
6
votes
2answers
344 views

How can I go about testing this javascript?

I'm working on a project that has me responsible for testing out some software that scrapes a web-page representing an input form, and generates a mobile friendly version of that page. This is ...
0
votes
2answers
72 views

Best practices for testing deep objects?

I'm writing in javascript with 'should' library, but this doesn't matter. I should write test for method, which returns a quite big object with a lot of fields. How I should write my expected result? ...
-6
votes
1answer
175 views

Golang Testing Process [closed]

I am new to golang and RunC and now doing some research on it as a part of my intership. What kind of contents do the ' _test.go ' functions check during testing a program or a container with Golang (...
4
votes
2answers
381 views

What to do with my unit tests when refactoring code to a new class

I hope I can make a clear question... I've simplified my code example for this question, I hope it still makes sense. public class PersonComponent { public bool IsQualified(Person person) { ...
3
votes
2answers
135 views

Defining and testing detailed user interface requirements

I am in the process of designing and building a small web app. While implementing a first prototype I discovered that I make many unwritten assumptions about the behaviour of the interface. For ...
2
votes
1answer
122 views

Testing async code: are long sleeps acceptable?

I am testing some AngularJS code using Selenium. Angular updates the DOM in unpredictable order, sometimes completely async (via setTimeout), so it is difficult to know when the DOM has been ...
35
votes
7answers
4k views

Is there a need to keep tests for simple (self-contained) functions?

Consider this: public function polynominal($a, $b, $c, $d) { return $a * pow($x, 3) + $b * pow($x, 2) + $c * $x + $d; } Suppose you write various tests for the above function and prove to ...
4
votes
1answer
109 views

Code Coverage or Test Brevity?

I've been writing a lot of unit tests lately and have become somewhat obsessed with code coverage. However, I'm struggling justifying going for 100% code coverage, when so many tests would be a ...
-1
votes
1answer
149 views

How do front-end developers test pages when the files they are handed are PHP views? [closed]

Someone who has a PHP project invited me to do the front-end work on his site. I don't know PHP, I've only ever worked with HTML/CSS/JS files. I cloned the project files from GitHub, and all of the ...
1
vote
1answer
48 views

Developing an application where a chunk of the code is used by both the app the tests

I'm developing a web app in PHP where part of the code I'm developing for it will also be used in the tests. I'm not sure how to handle this. That code in question is an abstraction to communicate ...
15
votes
2answers
960 views

Is it ok to avoid testing base classes?

I have a base class with a fair amount of "meta programming" to give it the flexibility/abstraction it needs to be rather generic. I do have a lot of subclasses using the common methods in the base ...
0
votes
2answers
94 views

Testing Scenarios More than Once

Is there an industry standard in how many times a scenario is tested before it is considered passed? Is it common to test a given scenario using multiple different records? Here is the issue: A ...
2
votes
0answers
71 views

Managing code: Unit tests with source or separate?

The standard practice in the Objective C world has been to follow that laid down in the Java world when it comes to code management. i.e. Your application source code goes in one directory, and your ...
7
votes
4answers
700 views

What is the right testing strategy in Agile Scrum/Kanban teams?

The problem is: The team , I am working in has 10 developers to 2 testers ratio which means we are going to churn out code more quickly than it is "Test" done. So, What should be the right approach ...
2
votes
3answers
265 views

Unit testing text output

I have recently become responsible for a legacy tool that analyses code and provides a log as output. As part of the JUnit suite for this, there are ~100 tests that rely on successfully matching the ...
2
votes
1answer
292 views

How to approach legacy code? Desperate case [duplicate]

I have a methodological question. I am faced with a reasonably large legacy system (Java Enterprise). I am new to its codebase -as everybody in the team- since it's a product we had in outsourcing ...
7
votes
3answers
235 views

Can I avoid more faults if I use different paradigms for the implementation and the specification/tests?

Since it is convenient for the developer, the same paradigm are often used for implementations and specifications, e.g. for testing (e.g. Java for the implementation and unit tests, Scala for the ...
1
vote
1answer
62 views

Website form testing [closed]

My boss has three websites and each of those websites have forms on them that people can sign up for nightclubs. He asked me to look up usability tests, however, I don't think that's what hes ...
0
votes
1answer
557 views

Step-by-step functional testing automation

I have a basic class in C# from which I create inherited classes for databinding scenarios. You can think of it as a substitute for .NET's DataRow class. I want to automate testing of a typical row's ...
87
votes
12answers
11k views

Is testable code better code?

I'm attempting to get into the habit of writing unit tests regularly with my code, but I've read that first it's important to write testable code. This question touches on SOLID principles of writing ...
0
votes
2answers
49 views

Is there such a thing as the testing of automation?

I know that it's possible perform automation of testing. That is, take tests that are manual, and make them automatic. However, is there such a thing as the testing of automation? That is, checking ...
2
votes
1answer
91 views

Code review and testing in the process

I am thinking about the software development process of my team, more specifically, I am thinking about tests and code review into our development process. I came to the conclusion that, in order to ...
1
vote
1answer
632 views

How to pass object generated by certain test class to another test class using webdriver and testng

I am contemplating on creating a public api for my team to use that will encapsulate the workings of webdriver and testng as it's main tools. Primary to the concern is re usability of code when ...
7
votes
3answers
259 views

How to write tests that make sense for visualization software?

I have a fairly large piece of software which takes certain file types and visualizes them / creates a host of buttons for manipulation of the image plotted. I feel like I'm finding bugs / pieces of ...
1
vote
2answers
335 views

Testable design in Swift

I've been searching for so long about how to design testable classes in Swift but every information site just describe basic stuff like how to test, how to assert, why is testing good... My current ...
16
votes
3answers
1k views

Shipping test code. Why wouldn't you?

I would like to ship test code alongside a product. Specifically, provide an option so that anyone with a copy of our program can hit a "self-test" button or pass --self-test on the command line and ...
1
vote
1answer
250 views

Functionality in ISO 9126 is Non-functional quality? Contradiction in ISTQB and many sources

I have been doing some research and realized that I missed the fact that in ISO 9126 and ISO 25010, all characteristics are quality characteristics and represent (according to various papers) just non-...
-2
votes
3answers
254 views

On testing the testers [duplicate]

My question is similar to Leaving intentional bugs in code for testers to find: We don't do this at our firm, but one of my friends says that his project manager asked every dev to add ...
24
votes
6answers
663 views

TDD in theory in only

A little over a year ago I was fortunate enough to be able to take a 9 month break from work. I decided that in that time time I would hone my C# skills. I started working on a bunch of projects and ...
3
votes
2answers
250 views

Testing strategy for wrapper class

In my Android project I decided to create wrapper around SharedPreferences(which is basically key-value storage) with following interface interface Preferences{ public void saveInt(int value, ...
5
votes
2answers
270 views

How to decide what forms the System Under Test

Ok, so we started with the initial version of "The Art Of Unit Testing" and we do unit tests for classes where every test covers one aspect of one method. This has the drawback of high maintenance ...
50
votes
8answers
7k views

Is it good that testers are competing to see who opens more bugs?

I'm a software developer. There is a team of testers who follow and run test cases written by the analyst, but also perform exploratory testing. It seems like the testers have been competing to see ...