Verifying the behavior of a software system against the expected behavior of that system.
3
votes
2answers
70 views
How would one test a function with a large number of scenarios?
I've heard that it's ideal to have one assert (or expect or should, etc) per aspect of a component's behavior you're trying to test. Is this how it works? An addOne function would be tested like this, ...
-2
votes
2answers
200 views
Is it normal for a graduate to be overwhelmed when looking at other's code? [on hold]
I'm a recent graduate, applying for a junior programming position (.NET). I've spoken with a few companies already, some of which I met through a recruiter. I like one of them a lot, but I'm worried I ...
57
votes
10answers
6k views
Where is the line between unit testing application logic and distrusting language constructs?
Consider a function like this:
function savePeople(dataStore, people) {
people.forEach(person => dataStore.savePerson(person));
}
It might be used like this:
myDataStore = new Store('some ...
0
votes
2answers
59 views
Parallel testing API based mobile application
The setup
So we have a RESTful JSON API. There are iOS and Android applications that consume the said API (one of each).
The code for the applications is such that the endpoints are hardcoded to "...
0
votes
0answers
59 views
Should Rails views actually render anything?
I've joined a Rails app with hundreds of pages and no tests, first thing I've done is set us up with model-, controller- and feature-tests and I'm adding them as I work on areas.
One thing I'm ...
-2
votes
0answers
7 views
To save the contents displayed in QsciScintilla into a text file
I am using an object of QsciScintilla object and using following code to load the file.
class myEdit:public QsciScintilla{
public:
void readFile();
};
myEdit::readFile() {
if (...
1
vote
2answers
32 views
Update semver minor version on test updates?
I always try to adhere the semver spec when I commit changes. This time though I was wondering what to do when I update my tests: I'm working on an API client that includes a simplified API server ...
0
votes
0answers
31 views
Debugger directions
I am running an old DOS executable file that runs a set of instructions to test an electronic component via com1 (RS-232) on a pc. The 16bit software has 8 main routines and some subroutines within to ...
0
votes
0answers
30 views
Testing a factory service, am I doing it right?
I'm trying to integrate Pagerfanta in my Symfony application, so instead of creating the paginator objects in the controllers, I created an factory for instantiating the Pagerfanta objects:
<?php ...
25
votes
3answers
3k views
Are integration tests meant to repeat all unit tests?
Let's say I have a function (written in Ruby, but should be understandable by everyone):
def am_I_old_enough?(name = 'filip')
person = Person::API.new(name)
if person.male?
return person....
7
votes
3answers
248 views
How to combine strict TDD and DDD?
TDD is about designing code, guided by tests.
Thus, typical layers aren't usually built upfront; they should slightly appear through refactoring steps.
Domain-driven design involves a lot of ...
4
votes
2answers
28 views
Test arrangement using the system under test
I have some integration tests around stored procs. Typically I do the test setup using Dapper. This is fine for simple cases, but in some cases to setup up the system correctly it would be far simpler ...
1
vote
3answers
52 views
Automation testing strategy with changing test cases
Say, for example, you have a program that sends a message to a server and that server validates it.
Note: The server validation process can have additional test cases due to it being implemented in ...
13
votes
2answers
1k views
How to go about testing un-injectable code?
So I have the following piece of code in use all over my system. We're currently writing unit tests retrospectively (better late than never was my argument), but I don't see how this would be testable?...
0
votes
2answers
130 views
How to get developers to fix broken tests
In our company we have multiple test stages:
unit and integration tests (CI build)
application tests (all calls to
other systems are mocked)
system tests (interacting with other
systems)
all ...
0
votes
1answer
61 views
What are unit tests called when they change data instead of relying on mocks or stubs?
What would you call a test that is similar to a unit test, except it actually modifies a file, directory, or database data? It is similar to a unit test in that it does test a single method of a ...
24
votes
8answers
4k views
Wouldn't it be beneficial to write tests during code review?
A colleague of mine came up with an idea that I found interesting.
Wouldn't it be beneficial to write tests during code review, by the person doing the review assuming that we don't do TDD?
For ...
33
votes
6answers
3k views
Should there be unit tests for complex regular expressions?
Should I write unit tests for complex regular expressions in my application?
On the one hand: they are easy to test because input and output format is often simple and well-defined, and they can ...
0
votes
1answer
52 views
UI Testing and Code Coverage [closed]
My company wants me to write UI tests that test the business logic (all of the use cases MUST be independently testable) I decided to do it in selenium. I have managed to create a decent product (as ...
1
vote
1answer
36 views
Abstracting end-to-end test cases across multiple pages
I am using Protractor and Jasmine to create end-to-end tests for a webpage. To test this initial page, I have abstracted made some common utility functions to create about 20 test cases for this ...
2
votes
1answer
39 views
Use Coded UI Tests for Integration
I have a couple of users who have a User Interface for an application that they must use to do their job. The UI can be cumbersome to navigate to perform some time critical tasks.
This UI does not ...
1
vote
0answers
47 views
Determining if webgl code will work on a variety of hardware
I have some javascript/webgl code. I want to have some idea of whether it will work for someone with a different browser/machine/gpu.
This is difficult, because there's so much diversity in support ...
2
votes
1answer
57 views
Writing Automated test cases for a folder Archiving Class.
Using C# and Visual Studio, I've developed a class that zips and archives a folder into desired location, creating directories and manipulating files on a machine.
The intended use is as an part of ...
0
votes
0answers
42 views
Does CI servers allow maven to generate content outside target directory?
I'm maintaining a Multi Module Maven project, I have a module that contains some tests, the tests run smoothly locally, but on the integration server they don't, and the logs shows only FileNotFound ...
5
votes
3answers
185 views
Should unit tests always overlap
This is a test design question. I have a class 'handler' that accepts a 'validator' that checks some business logic on what's passed to the handler.
I made the unit tests for the validator and now I'...
1
vote
1answer
73 views
Testing a bootloader written from scratch?
I'm planning to write a simple bootloader. Nothing too complicated. Just really basic output and maybe keyboard input.
But it seems a bit crazy to restart my computer every time I want to run the ...
1
vote
1answer
171 views
Should I have code that only exists for testing?
I have a service class which is responsible for instantiating repositories and using them. It makes an external Http request which ideally I would like to mock for testing. However, I am not quite ...
1
vote
2answers
72 views
How short/stable should tests/build be for working CI/CD pipeline?
(Please note that this question is linked to this: How can Continuous Delivery work in practice? - but it asks a more specific question regarding time and stability).
CI/CD, no manual QA, super quick ...
5
votes
2answers
211 views
Is this the wrong environment for CI?
Background
Team/Project Size
Currently at our company, we have a team of 3 developers. We each have our own projects that we work on. So, we never have more than one person working on a software ...
0
votes
0answers
36 views
Tracking a program-wide state of tasks being done and making it testable
I have a program which does some processing which can be asynchronously requested (WCF). There should be only one computation per identifier (always supplied upon request). So if at some point work is ...
-2
votes
1answer
100 views
Test Cases in an Interview Setting
In the first cracking the coding interview video Ms. McDowell talks about candidates that begin by writing test cases in whiteboard interviews. How would one go about this?
For example, the ...
0
votes
0answers
13 views
Approach for efficiently working on view controllers in iOS app
When working on a specific view controller within an app, my approach has always been to make some changes to the code, launch the app, navigate to the view controller and see if everything is working....
1
vote
2answers
114 views
From a software development lifecycle perspective, is duck-typing a benefit or a problem?
Statically-typed languages such as Java afford the benefit of compile-time checking of types - you are guaranteed that an object is of a given type, so:
there is no need to spend time and resources ...
3
votes
1answer
66 views
GUI Testing With Network
I am doing GUI tests for my network application and I'm wondering if I should stub out mock responses, or if it's OK to keep using the network for the GUI tests.
It seems to me the main benefits of ...
2
votes
3answers
216 views
Browser Web Application UI/End User Testing
I am building a web application in php. I am following TDD (write tests before production code) for my unit tests and using BDD to drive discovery of my applications features and to provide ...
4
votes
5answers
96 views
What are the best practices for managing Test results
We are using GitHub for managing source code and waffle board for managing workflow/issues.
Right now when we test the system using custom written test cases, it generates a CSV file. We want to be ...
5
votes
2answers
210 views
The concept of “quality gates” in software testing
We are using SonarQube for code quality testing. It tests the quality of code, and not the function of code. It has the concept of quality gates, so you can set for instance a 90% quality gate, ...
7
votes
3answers
238 views
What should be the scope of a health check for a system which deploys a webapp?
Today I had a task to "write a health check" for a long running service that is an orchestration system to deploy a web-app.
I am trying to determine what the scope for such a health check would be, ...
1
vote
2answers
67 views
How much optimisation should one put in for slow integration test setups
I have some very slow integration tests that use Selenium and require a lot of database setup. The setup and tear down times are in the order of tens of seconds while the test bodies only take a few ...
0
votes
2answers
111 views
Spring-MVC : Testing code by automatically running it in UI
I am working on a Spring-MVC application(config XML based, no Main class) in which I would like to do testing. I have known that there is a way to test code which is backend+frontend code. For that, I ...
4
votes
3answers
183 views
What kinds of bugs can integration testing actually find?
I feel like, in web dev at least, that integration tests can't really find any useful bugs. I can't think of any, at least. If I can use unit tests to verify that one section of my code calls a ...
0
votes
0answers
31 views
Writing test cases for another web service
I'm working in a team as a developer. We have developed a product where we generate letters by populating some XML file. This XML file ONLY contains some texts that need to show up in a pdf document. ...
4
votes
4answers
120 views
Test cases do all the work through helper method — bad practice?
Consider a test suite like this:
public class MyTestSuite {
@Test
public void test_something() {
testHelperMethod("value11", "value12", "value13");
}
@Test
public void ...
3
votes
1answer
63 views
How do you properly test a complete software replacement
We have System A (an application and a database) that is built for a specific business department and therefore has business aligned data model and table structure.
System A is a mission critical ...
5
votes
4answers
206 views
Can we encourage our test team to collaborate with developers on automating tests?
I am a C# developer, and my team and I are trying to start automated functional tests. (Note that we don't want to do Unit Tests; we expect to develop tests which test one function point per test)
...
2
votes
1answer
151 views
What is the proper infrastructure and release cycle for developing and testing an application? [closed]
I am developing a web application for my coworkers, and from a little management app it is becoming a more and intense large project that is involving more people as I go. I am pretty sure my boss ...
7
votes
1answer
156 views
How to test calculations that are only passed down into the stack rather than returned upward
This is a problem I have been trying to wrap my head around a couple months now. It has shown up again in a learning project I was working on last night, so I will use that as an example.
I am ...
1
vote
0answers
42 views
Rules of thumb for test coverage [closed]
In general it makes sense to me to unit test everything besides glue classes which have no logic. They often catch mistakes and code smells even at the time of writing let alone protecting you from ...
1
vote
4answers
130 views
How and where to test if the JSON request objects generated by the front-end is valid
We have built a complex Angular application that sends multiple HTTP request to a REST service that is also built in house.
Since both the frontend and the backend is being developed in parallel, ...
0
votes
2answers
80 views
How can I test code that verifies data sanity?
I have a large data structure that gets read in from XML. I've been given a large list of constraints that should hold between data members. For example, one of the constraints might look like
...