Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [testing]

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

1
vote
2answers
54 views

How to write unit tests a method with a result that is highly based on another method

How to write unit tests a method with a result that is highly based on another method ? async function getStatus( session, correlationId, data ) { const client = new SomeAPIWrapperClient({ ...
0
votes
3answers
179 views

Is it still TDD if I follow the cycle for each method alone?

The question is not very expressive, anyway what I was wondering is if, if I follow the red-green-refactor cycle for each method is still TDD or if it has to be done globally. I mean, let's say I have ...
1
vote
1answer
59 views

Best practices on testing a function based on third party service

I'm trying to figure out how to create unit tests for a function, which behavior is based on a third party service. Suppose a function like this: def sync_check(): delta_secs = 90 now = ...
2
votes
4answers
128 views

Valid use-cases for white-box testing? [duplicate]

White-box testing focuses on testing implementation details of a component. Black-box testing sees a component as a black box accessible only via its API. Both Lean and Agile software development ...
-2
votes
0answers
27 views

State of the art on testing system architecture [closed]

I work in a lab containing a system of computers and simulators interacting with each other in order to recreate a complete and accurate boat simulation. The software used on these machines receives ...
9
votes
7answers
501 views

Are end-to-end and integration tests worth it for non-mission critical stuff?

It's well known that end-to-end and integration tests are costly. Of course if we develop applications where people might die if things go wrong it's a worthwhile investment. However in applications ...
0
votes
1answer
121 views

Are automated UI tests necessary? What should be tested?

Our small team writes desktop apps using WPF + Prism. Most of the team members are not so familiar with professional software developing process. I'm trying to adopt some agile techniques to make the ...
1
vote
0answers
41 views

Better approach of testing groups of small services with or without dependency injection

Let's assume, that frameworks I use, provide some kind of dependency injection automatically available in testing environment. Let's also assume, that I have a lot of micro services in my application....
3
votes
2answers
120 views

How to improve code quality in database driven applications

I'm working for a company with a big ass legacy codebase. Changing existing code is like a guarantee to break things. Most functions are a few thousand lines, using some global flags, having different ...
4
votes
3answers
158 views

Is checking for unexpected types in dynamic languages in an untyped project necessary?

In statically typed languages or dynamically typed languages that use a type checking system you can guarantee that the input type is the type that you specified in the contract. However, in ...
-3
votes
0answers
29 views

How to develop an automated testframework + visualization for algorithm pipelines?

Right now I'm working on an image retrieval engine which is basically a pipeline consisting of multiple algorithmic steps all of which have tons of parameters to configure and evaluate. In the end I ...
-1
votes
1answer
90 views

Best practice - Single or Multiple source code repository

As mentioned here: The main aim of CI is to prevent integration problems, referred to as "integration hell" Our project is a 3-tier web application, with frontend(Angular 6), backend(Springboot) &...
1
vote
0answers
27 views

Write integration tests with React using Jest

Let's imagine that we have this Page component: const Page = () => <> <Topbar /> <Drawer /> <Content /> </> I'd like to test some interaction within ...
1
vote
2answers
51 views

Integration Testing: Should a test check every validation?

I am somewhat new to writing tests and I want to build that habit into my workflow. So for example I might write a test that a user can create a blog post however I'm not sure on how to do that ...
-2
votes
1answer
86 views

What in practical-stupid-childish terms a mutation testing indicates?

Whlist browsing on github I came across the following project: https://github.com/infection/infection and according to the project's website https://infection.github.io/guide/#What-is-Mutation-Testing ...
0
votes
2answers
121 views

Creating a list of functions in java [closed]

I have a list of functions which need to be tested against a list of inputs to measure their relative performance. I have already create a test function like below: public static String testFunction(...
1
vote
1answer
100 views

Storing test results in a Git repo?

At my company, we use a distributed pool of virtual machines to run our UI and API tests. These machines are all connected to an onsite server which the pool uses for publishing the test results and ...
0
votes
3answers
125 views

Is is worth the time to create a list of manual regression tests for a legacy application?

I am part of a new dev team that is assigned to work on a legacy app. The app currently has no regression or automated unit, integration and system tests. Due to technical debt and convoluted ...
2
votes
2answers
176 views

How to organize my test functions? (Part II: Keepin' it classy)

What are the best practices to organize your unit tests in classes? I see different possibilities: 1) One would be to write one "container" class for each function you want test and then ...
1
vote
0answers
32 views

Perspective based reading - Artifact created

From what I have learned, in Perspective based reading, the document/code/etc., is inspected from different perspectives. We consider roles like software designer, tester or user. Each role follows ...
-1
votes
1answer
128 views

static, dynamic analysis - what mistakes were made in the code?

A software company develops software packages for commercial animal farming. A special function in C calculates the daily amount of feed for different kind of animals dependent on their bodyweight....
2
votes
1answer
60 views

Where to put an artifact which will be used only by test

I am developing a new feature for a well-established memory package. The feature Im implementing is about loading/copying/moving resources in and out to different type of structures like jars, ...
1
vote
1answer
33 views

Should I run my tests against production build transforms (i.e. Babel)?

A coworker of mine recently setup testing in a new project (a JS library) where a transform step hooks in to the babel config for Webpack in the production config. For reference, this is the setting ...
-1
votes
2answers
104 views

Is QA/QC more related to proprietary softwares?

I'm not a software engineer, but I like coding for myself. Thus, I don't know what goes in IT companies. Keeping the amount I spend on GitHub, I never heard of the term QA/QC in regards to open ...
1
vote
2answers
99 views

Unit and integration testing of microservice architecture

I am investigating how to test a project. Some information about the project: Microservice architecture, with roughly 20 services. About 10 of them with a separate database. We use ServiceFabric ...
-2
votes
2answers
102 views

How many valid users to test the software that has been developed?

Anyone know, how many users are valid to use the prototype of the software that we have made? I have conducted research on the reference to the "Software Engineering A Practitioner's Approach book ...
0
votes
2answers
131 views

If “negative” conditions are mentioned in the spec, are such tests still negative?

In most definitions of negative testing, the idea is that we test outside what is specified/expected and it is highly related to robustness. So basically, if the behavior for such conditions is ...
0
votes
1answer
21 views

How do cloning drives, system recovery points and virtual machines compare for system state recovery?

I want to setup a dedicated test computer that can be restored to a specific system state. The reason for that is that the software tests to be executed on that machine include the installation ...
2
votes
2answers
92 views

Is it normal to retest the entire sprint before pushing to UAT

I have <5 years experience in the software industry and this is my first time doing QA. Before the stories in a sprint move to UAT, I am supposed to retest every single story in ~1 day in an ...
1
vote
1answer
174 views

Problem in creating a correct finite-state-machine for a given short text

I like to create a finite-state machine for the given text below. While solving this, I came accross with several problems I listed at the bottom. (This example is in terms of testing (where you later ...
-2
votes
1answer
64 views

How to identify test cases?

I wrote a small INI file parser as a library which I want to use in a bigger project. Following good practice I decided I should write test cases, too. But I fail to find a good start. The library is ...
1
vote
1answer
202 views

How many test-cases need to be created at least (valid and invalid equivalence class)?

Assume there is any program that is supposed to be tested and you like to perform an equivalence class analysis on it. Let's say you identified six valid and four invalid equivalence classes. Then, ...
1
vote
2answers
95 views

Should linters no-magic-numbers rule used in testing?

So I am just starting to use a linter and I like the no-magic-numbers rule in generally. But in unit test files it is giving me 1000 warnings. Here is what they look like: it('getWeekNumber', ...
-1
votes
1answer
39 views

Where do you put tests that are not unit tests in a Maven project?

I'm building a Spark-based, text analysis package using both Java and Scala. I have a series of transform functions, which take in one dataframe and spit out another, and that can be chained together ...
2
votes
3answers
147 views

Features to catch bugs that make it to production

Apologies if this isn't the right place for this question, please direct me elsewhere if that is the case :) I was having a discussion with my boss who has experience (but not official education) in ...
5
votes
3answers
455 views

Is it legit to close a bug as duplicate of another still open bug?

I often encouter the following pattern: A bug is resolved/closed as duplicate of another still open/unfixed bug. I have trouble understanding the reasoning behind this strategy. From my naive point ...
0
votes
1answer
69 views

How to test an API that can change the response during time?

I currently use the Google trends API and I implemented a class to integrate with its services. As you probably know, Google trends tracks statistics which will change over time. So, when I write ...
7
votes
4answers
329 views

Should log statements be tested?

When writing tests I usually ignored logging statements, but now I wonder if it was right. The logs are often important tools when diagnosing production issues, moreover there can even be ...
2
votes
1answer
97 views

How to organize my test functions?

I'm writing a software application of a few thousand lines of code (in Python), and in order to keep the whole thing together, slowly but certainly the need for unit tests (and later, other types of ...
3
votes
1answer
31 views

mutation testing relationship with test unit and original code

I have reading about mutation testing and even though its inner functioning or how to do it is clear to me; I am having some troubles to understanding the relationship between a program that wants to ...
2
votes
1answer
125 views

What's the purpose of xfail tests?

Some test frameworks, notably DejaGnu and py.test, have an "XFAIL" flag/status for a test which says that this test is expected to fail. If the test succeeds, it's marked as "XPASS" (unexpected pass). ...
1
vote
3answers
319 views

How do I test unreachable code?

Let's say your company sells software that comes with customizable text, and your team's job is to customize it. The client engagement includes a contract in which the client specifies all of the text ...
0
votes
1answer
71 views

Testing - concise mocks vs asserting received calls

Let's say we have this method: string Add(int a, int b) { var sum = _calculator.Add(a,b); var response = _formatter.Format(sum); return response; } Now I want to unit-test this method. ...
0
votes
2answers
52 views

How to automatically test the result of an ETL tool?

If an ETL tool is being used to move data from an OLTP database into a "business intelligence reporting" database, is there any standard way of automatically testing that the data in the reporting ...
4
votes
2answers
224 views

How to engineer and test mission critical software?

TL;DR: My goal is to create some framework with which I could discover/test all possible internal states of my application so that I would approach with confidence for example engineering software for ...
2
votes
4answers
140 views

Should QA test bugfixes in Dev Environment

I encountered a situation where the dev team suggested that they will push bug fixes to our dev environment rather than to the test environment, and they asked QA to test there first. I am not sure if ...
67
votes
6answers
10k views

How exactly should unit tests be written without mocking extensively?

As I understand, the point of unit tests is to test units of code in isolation. This means, that: They should not break by any unrelated code change elsewhere in the codebase. Only one unit test ...
-1
votes
1answer
97 views

Best practices on unit tests for consecutive functions

Let's say we have function A and function B which perform consecutive operations on some data, with B never receiving the data before A processes it. Function A makes exhaustive checks on potential ...
16
votes
7answers
4k views

Is it a good idea to write all possible test cases after transforming the team to TDD to achieve a full coverage?

Assume we have a large enterprise-level application without any unit/functional tests. There was no test-driven development process during the development due to very tight deadlines (I know we should ...
-1
votes
1answer
40 views

How do I test my python package (for distributing) for different versions of python?

I have made a small library/application that I intend to distribute. However I want to find out what versions of python can handle my script ? Given that there are many minor and micro versions and ...