Questions tagged [testing]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
64 views

How do I test a method which interacts with a database?

So I have a database class which has methods dedicated to specific actions. For example I have below method which accesses and writes to a table in the database: def trackUserPerformance(self, ...
5
votes
3answers
235 views

Should tests perform a single assertion, or are multiple related assertions acceptable

Assume a client is making a request to an API endpoint that returns a JSON response where the structure and data change depending on whether the request was successful or not. Possible responses may ...
-3
votes
3answers
67 views

How to know if I need a unit test? [duplicate]

Do I need unit testing for everything? I know that Unit testing is not necessary for really small tasks, but what about for bigger stuff? How do I know I need a unit test?
6
votes
4answers
291 views

When do you have enough automatic testing to be confident in your continuous integration pipeline?

Continuous integration with testing is useful for making sure that you have "shippable" code checked in all the time. However, it is really difficult to keep up a comprehensive suite of tests and ...
-1
votes
0answers
21 views

Transition Tour Testing [migrated]

Could someone explain me or give me an example how the Transion Tour Testing Method works for a finite state Machine ? I know that that the Tour is just the expected outputs from the initial state ...
0
votes
3answers
70 views

Unit Tests vs System Tests

I've always know Unit Tests to be something you do in code. You write functions to test other functions. Our team has been working with the same project manager for a while now and he's always ...
-2
votes
2answers
70 views

How do I model all the different states of a widget for testing?

Say I am a QA person so I have no control over the complexity of the code in the following example. I have a datatable widget with many different filtering and searching options. All the columns on ...
-1
votes
2answers
130 views

Big Bang Integration Testing vs System Testing

In Big Bang Integration Testing, we combine all the modules we have together after unit testing immediately as one whole to see if there are errors. In System Testing, we basically test the whole ...
8
votes
3answers
535 views

How do I write unit tests for legacy code (that I don't understand)?

Forward I've read a lot of things before asking this question, including many relevant questions right here on SE: (Software Engineering SE) Writing tests for code whose purpose I don't understand (...
1
vote
4answers
289 views

Is it bad practice to repeat logic being tested in unit tests?

Often I find myself writing a unit test for code and repeating some or a lot of the logic in the unit test to make the unit test DRY. For example, consider the following piece of code: function ...
3
votes
5answers
303 views

Should I add additional unit tests for this helper method that simply aids in refactoring of code?

I have a method: public static void AddPersonToPeopleList(List<PersonModel> people, PersonModel person) { CheckWhiteSpace(person.FirstName, "FirstName"); ...
5
votes
3answers
293 views

How should a derived class be tested?

I have a question regarding proper design of tests. Suppose that there is a class A class A{ public: virtual int methodA(); virtual int methodB(); virtual int methodC(); ...
3
votes
3answers
121 views

Testing new feature in existing test?

A new feature is being developed. I want to test this feature in different scenarios. We have existing tests that correspond to this scenario (but they test other features). Should I : insert new ...
2
votes
2answers
240 views

How important is sprint test plan in agile?

I have been preparing a test plan for every sprint even if I have a master test plan just to plan the test for the current sprint. I am including topics like: Introduction Purpose Feature Overview ...
3
votes
4answers
508 views

Should test code be treated as normal code? [duplicate]

I remember reading on someone else's post that test code should not be treated as normal code but as small whole programs and that is an idea I really like and would like to refer to when discussing ...
2
votes
3answers
473 views

How to test required but accidental functionality?

For example, let's say I write a container class, which supports 2 kinds of operations: insert(x): inserts an element get_all(): retrieves all previously inserted elements Maybe it has some kind of ...
0
votes
2answers
64 views

What to test when testing an API? [closed]

When testing an API (with, for example, Java), what parts should I actually be testing when calling methods of my Controller class (e.g. a Spring RestController)? For example, lets say I've got a ...
4
votes
2answers
102 views

What is the relationship between IV&V professionals, Testers and QA engineers?

In the context of SDLC, I know that Verification and Validation is about verifying the deliverable input from previous phase and validating the output of the current one. And that testing is a phase ...
2
votes
4answers
241 views

Managing QA testing when there's pressure to merge things at the earliest possible

I'm working in a team of 12 where we have around 8 developers and a QA. We do not follow a git flow model but we do have feature branches where individual feature developments take place and then ...
2
votes
2answers
108 views

Methods of automated frontend tests

I am working on a Rails + React application and investigating frontend testing. Unlike the backend tests this doesn't seem to be a straightforward process with one obvious path. There are a list of ...
1
vote
2answers
103 views

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

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({ ...
1
vote
4answers
329 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 ...
2
votes
1answer
71 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
133 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 ...
9
votes
7answers
602 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 ...
1
vote
1answer
161 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
45 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
138 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
170 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 ...
-1
votes
1answer
113 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
76 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
76 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
92 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
146 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
125 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
129 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
181 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
38 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
135 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
61 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
35 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
166 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
134 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
98 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
183 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
69 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
238 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, ...