Verifying the behavior of a software system against the expected behavior of that system.
2
votes
2answers
180 views
Don't repeat yourself vs do only one thing in a method
I am currently writing some test cases in python. I often end up calling the same two or three lines of code at the start of a test case in order to get the program I am testing going. For example:
...
0
votes
1answer
54 views
Cyclomatic complexity for 2 IFs - why not just FF or TT?
I know that cyclomatic complexity defines the number of independent paths in the code. Using the simple way, it can be calculated as number of IF +1. In that case, for a simple code with two IFs, CC ...
1
vote
1answer
43 views
Testing front-end app that hits a REST service
A lot of questions about testing here... And I have another one. Forgive me, but I want to make sure I do this right.
Let's say I have a front-end application, be it a mobile app, or a single-page ...
1
vote
3answers
138 views
Domain analysis - why OFF points are inside of the domain when the border is open
I have asked on a few other sites, no response but it must be something silly as many authors mention in their books.
Here is the best text I found:
My ultimate question is:
Why the OFF point lies ...
0
votes
0answers
43 views
Domain analysis for discrete values - ON and OFF points in these cases
Following my previous question (with great answer from Bart van Ingen Schenau), I noticed a discrepancy I could not wrap my head around:
Bart mentioned that:
The point ON the boundary is by
...
0
votes
1answer
98 views
Where should I store and verify files manipulated by an app
I'm working on a little Ruby script to move screenshots while renaming them based on a specific convention. I'll be writing tests to confirm the behavior.
Ruby has lots of conventions for where to ...
3
votes
3answers
116 views
Helping testers who don't have specialized domain knowledge
I am a team lead on a project that develops specialized engineering software. My developers generally have advanced degrees and the domain knowledge needed to work with the software we develop, but my ...
1
vote
1answer
26 views
PHPUnit > Best approach to mock container objects? (e.g. $item->id)
I'm using PHPUnit test doubles to mock models, libraries etc. But when I want to return an array perhaps of container objects, how best to do so. Here is what I'm currently doing:
/**
* This is just ...
0
votes
4answers
52 views
Testing generic errors
I've got a program that validates it's input, and then errors.
So far for each kind of error I created a new derived class. But this was getting pretty unwieldy (the input is complex so there are ...
2
votes
2answers
243 views
What UML diagram should be used for modelling permissions/users/files in Linux?
If I am planning a structure for support testing in Linux, a structure that will contain packages, such files as shell and build scripts, app configurations, DBs, sources, tests and jars for to be ...
0
votes
1answer
68 views
Reproducing a bug in production that happens with a large database
We are running Oracle 12c and a custom application written in Java/JDBC (Java 8). Our production system is running a 5TB database and runs into deadlocks. However we have been unable to reproduce this ...
1
vote
1answer
62 views
how to unittest with thorough test coverage [duplicate]
I am trying to get into unit testing with python (though my question
is not specific to python).
I want to add a test for function I already have - I know I should do it
the other way round, but here ...
7
votes
3answers
8k views
What is a Developer in Test?
I was recently talking with a recruiter who wants to put me at a company for a position of Developer in Test. He essentially made it sound like a position where you get to fiddle with new programming ...
6
votes
3answers
124 views
Where should I store test data?
I have smaller unit tests that use small snippets from real data sets. I would also like to test my program against full data sets for a multitude of reasons. The only problem is that a single real ...
0
votes
3answers
93 views
Should all possible counter-cases be tested? [duplicate]
I'm currently trying to unit test a behavior which, in some very particular cases, returns B instead of A. It may depend on the value of 3 different attributes for example.
How should I test this?
...
1
vote
2answers
200 views
How to add rigor to my testing?
I work on a small/medium sized Java application. Over time, I've tried to ensure that the tests which I write are "good" tests, and that there's plenty of them. Hence I've been looking into various, ...
0
votes
1answer
65 views
Testing process on life critical systems [duplicate]
I currently work in web development - unit testing, functional testing are all good and really are part of what is considered being a professional developer.
However, I also have a fear of flying and ...
5
votes
6answers
2k views
Parameterized tests - When and why do you use them?
Recently at work we've been having some differences of opinion with regard to Parameterized testing. Normally we use a TDD-style (or at least try to) so I understand the benefits of that approac. ...
0
votes
6answers
181 views
Cheap implementations in fundamental TDD
This is a question concerning the fundamental approach of TDD, so the example below is as simple as possible which might make it seem a little useless; but of course the question applies to more ...
3
votes
1answer
103 views
How do you write tests for methods that interact with data in system files?
I'm trying to be proactive about writing an iOS app in a test-driven manner. However, I'm stumped as to how to test a method that is to interact with real system files. For those familiar with iOS, ...
1
vote
3answers
46 views
Replace repeated timestamp with variable in tests
I have couple hundred tests and I work with date/time a lot. In some tests, I aim for output format, elsewhere, I check date ranges. Therefore, my tests have lots of these:
FactoryGirl.create(:foo, ...
12
votes
5answers
1k views
Do I need unit test if I already have integration test?
If I already have integration test for my program, and they all passed, then I have a good feel that it will work. Then what are the reasons to write/add unit tests? Since I already have to write ...
3
votes
5answers
75 views
How QA/testing process can be evaluated?
I asked this question on Programmers about a crazy idea to evaluate how testers are doing their job. From the answers/comments, it seems community also considers that as a crazy idea. This is a spin ...
0
votes
2answers
106 views
Should methods perform checks that they accomplished the task they were built for? or should they just throw an exception?
What are some pro's and con's of validating your performed the task intended?
public static bool UploadFile(string filename)
{
// 1. upload the file
// 2. check to see if the file now exist ...
194
votes
20answers
27k views
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 intentional bugs just before the product goes to QA. This is how it works:
Just before the ...
3
votes
2answers
174 views
Software development - The industry & general trends / Bad practices [duplicate]
I am a Web Developer and part of a small team working on an abundance of projects. This is my first "actual" real company after graduating with a degree in computer Science and I have about 2 years ...
-1
votes
1answer
49 views
Where should I create utility classes that are used by unit tests, integration tests and functional tests?
Say I have a project that's using the standard Maven/Gradle project directory structure, with the source file directory like this:
src
├── functTest
├── integTest
├── main
└── test
What would be ...
1
vote
3answers
123 views
What does stubbing mean in programming?
I often hear the term stub, stub out somethings, stubs, ...etc. What does stubbing mean in programming, where the word come from? and in what contexts it can be used?(just examples)
5
votes
4answers
567 views
How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class [duplicate]
I want to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class.
This is the case:
I have four unit tested classes:
...
25
votes
3answers
3k views
What is the term for a 'decoy' feature or intentional bug? [closed]
I have forgotten a slang programming term. This thing is an intentional bug or a decoy feature used as a distraction. An example usage, "Hey Bob, QA is doing a review today. Put a $THING into the ...
8
votes
4answers
897 views
In TDD, if I write a test case that passes without modifying production code, what does that mean?
These are Robert C. Martin's rules for TDD:
You are not allowed to write any production code unless it is to
make a failing unit test pass.
You are not allowed to write any more
of a unit test than ...
3
votes
1answer
211 views
Any reasons NOT to write self testing Python code?
Whilst writing tests I was giving considerable thought to the question of how to ensure I have tests for every class in my application.
It occurred to me that maybe I should just put the test code ...
1
vote
1answer
77 views
Using conditional feature compilation/inclusion for release versioning
I have been playing with the following idea: commonly when different release series (1.0.x, 1.1.x, development code) of a product are maintained in parallel one uses different branches within a ...
3
votes
3answers
247 views
How does a software developer know if the target hardware is fast enough to run the software? [duplicate]
How do software developers manage to know if their software will run on the target hardware they are developing to? Many developers today work on machines much faster than the intended platform. What ...
1
vote
1answer
48 views
In boundary-value analysis, why test min+1 along with min?
In boundary analysis testing, some authors suggest testing MIN-1, MIN, MIN+1 (and the same for MAX).
Also for 1-100 range (if A>=1 && A<=100), test cases would be: 0,1,2 and 99,100,101.
I ...
-1
votes
2answers
200 views
Scheduling a Jenkins job to only run integration test [closed]
My current company has a Jenkins/DotCi setup. Our current process for CI is when dev pushes to github, jenkins runs unit tests on all branches and reports back to us via email if the unit tests ...
1
vote
2answers
92 views
Java applets with Safari on Windows as compared to Safari on OS X [closed]
I have a developed an Applet which works fine on Chrome/IE/FF on Windows. I am not expecting any users for Safari on Windows but there might be the odd user who may be on a Mac.
As of now, I don't ...
4
votes
1answer
75 views
Summarizing time spent on UI tests
I was working with a team on a web-based software. We have written ~70-80 Selenium test for the product. Mainly happy-path tests with some regression ones for bugs reported by users.
It was the first ...
0
votes
1answer
49 views
Testing - Test for Specific Paths?
When (unit) testing, is is bad to expect the code to use certain paths.
For example, should I be testing for specifically "/build/static/public/css/", or just that server.cssPath has been set to a ...
1
vote
2answers
99 views
Should you test development features?
Is it a good practice to test features that only run in a development environment, or just a waste of time?
Specifics: The item that is prompting this question is a line of code that dynamically ...
0
votes
1answer
117 views
Testing - How to test if you are actually testing the code?
I was thinking about unit tests and code coverage, and I came up with this thought:
It is possible to have 100% code coverage and not test 100% of your code.
For example:
function ...
1
vote
2answers
121 views
TDD and Writing Tests for File Processing
These questions are very similar: TDD for batch processing: How to do it? and TDD: how to test file outputs? but I'm still left wondering some things
The app processes files/pdfs. It takes them from ...
3
votes
1answer
97 views
How use same Behavior Drive Development (BDD) stories across platforms?
I'm writing an app that has a client for iOS, Android, and the web. The server is hosted on Google App Engine (Java). REST is used for the communication between clients and server.
In order to ensure ...
6
votes
3answers
565 views
Is there an effective way to test XSL transforms/BizTalk maps?
Creating repeatable tests for BizTalk maps is frustrating. I can't find a way to handle testing them like I'd do unit testing, because I can't find ways to break them into logical chunks. They tend to ...
5
votes
1answer
772 views
Is there an established or defined best practice for source control branching between development and production builds?
I struggled in how to phrase my question, so let me give an example in hopes of making more clear what I am after:
I currently work on a dev team responsible for maintaining and adding features to a ...
-1
votes
1answer
65 views
Starting a big application with unit testing [closed]
I am learning test driven develeopment and read some books about TDD. I learned rules of unit testing. How can I write unit test, how can I select test method names, Act, Assert, Action and like this. ...
0
votes
1answer
118 views
Term to describe pre-canned objects for use in testing
I have forgotten the term for a class that provides pre-canned objects for use as test data.
e.g. If I'm testing a payment module and I need credit card objects of different types, I might have a ...
0
votes
1answer
63 views
What's good about statement coverage?
When it comes to code coverage, you often hear about the flaws of statement coverage criteria. We're told that statement does not take into account control structures and branches thereof, and is ...
5
votes
2answers
209 views
How detailed should QA aim to be?
When QA discovers an issue during testing should they...
Log the bug with the test case and scenario information and move on testing?
Try investigating to determine why the bug is happening?
I ...
1
vote
1answer
109 views
How do I Create Automated UI test code for application developed using Domain-Driven-Design with very little concrete UI requirements?
We are developing an application using Domain-Driven-Design(DDD).
We have to come up with Automated UI Test code.
The customer has used 3rd-party GUI Administration template ...