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
2 answers
50 views

EFCore In Memory repository Unit Test of Encrypted data

I have in project linq repository unit tests. [Fact] public async Task Get_FromTreeEntitiesUnsorted_RetunsOrderByDescending() { //Arrange _contextReadonly.Entity.Add(new ...
cargt4's user avatar
  • 19
0 votes
0 answers
34 views

How to handle integration tests for different stages

A test program should post a json object to a rest service OrderRequest and receives an OrderResponse. The test program should tests against the quality assurance stage (qa) and against the production ...
surfmuggle's user avatar
-1 votes
1 answer
128 views

Will I lose confidence of my code working in mocking dependency injected services? [duplicate]

Let's say that I have a class with a service that is going to be injected at runtime: class Thing { private magic: IMagic; // Magically injected service public doStuff(){ // Do a lot ...
Tizio Fittizio's user avatar
-3 votes
0 answers
52 views

Testing python codebase and a C++ codebase

Our company has a Python codebase which is typically used for prototyping and a C++ codebase for the actual production. The pipeline is similar and particularly the functions are expected to produce ...
SKPS's user avatar
  • 95
1 vote
2 answers
134 views

How does one reliably test core Linux software (like package managers, UNIX utils, desktop environments, kernel modules, etc.)?

If I'm not mistaken, a major part of testing software is deploying and using it on your platform of choice. For critical system software such as UNIX utils, package managers, desktop environments/...
AcinonX's user avatar
  • 467
20 votes
6 answers
7k views

How would you identify slow queries before reaching production?

Let's say you are running a query on your database. In development and staging, where the amount of data is small, everything looks good. Unit and integration tests are also fine and the logic is ...
riorio's user avatar
  • 489
2 votes
1 answer
74 views

What is the correct way to configure a testing mode on a class?

I have a repository which reads and writes to Firestore, and some tests to make sure data is sent and comes back in the correct way. In order to test this I added a protected function which returns ...
Adam's user avatar
  • 272
5 votes
5 answers
3k views

What to cover with integration tests?

I'm working on adding unit/integration tests to an existing project (Java/Spring Boot) and I've been investigating on how they are "separated" in order to cover the test cases and how to ...
leugimlenipse's user avatar
6 votes
1 answer
297 views

What to do when test data takes up most of repo size?

TL;DR: Given a repo with a lot of big fixture tests, when should I look for a solution where the golden files are not part of the repo anymore? Where should they be stored? The setup Testing a ...
Turion's user avatar
  • 169
-3 votes
2 answers
282 views

Why are logs not used for testing? [closed]

In tests, state verification or collaboration verification is usually undertaken. One of the drawbacks of this approach is the coupling of tests to the design of constructs. Consequently, when ...
Kaveh Shahbazian's user avatar
24 votes
7 answers
5k views

How to get flaky tests fixed after having mitigated their flakiness

Recently, I was charged with making about 9000 Selenium tests start running in CI/CD nightly. These tests had built up over about 8 years and had up until then been run in an ad hoc way. It was ...
JustSomeGuy's user avatar
0 votes
1 answer
65 views

Load Testing for Large-Scale Architecture Involving Cloud Servers and Switches

We currently have an architectural setup as described below. Our plan is to conduct a load test, but we face a challenge due to the high cost of real switches. We have two options: either build the ...
Yiffany's user avatar
  • 101
4 votes
2 answers
181 views

How to check a solution method submitted by a user?

I am developing a website somewhat like leetcode, however, it will be for website testing using Selenium WebDriver.My service will provide different websites, along with various tasks that describe ...
Yahya Abdul Majeed's user avatar
0 votes
1 answer
124 views

E2E tests and fan in build pipeline

In chapter 9 (Testing) of the book Building microservices (2nd edition) Author suggests using a Fan-in approach to have a single shared E2E tests for all microservices. This way tests of unchanged ...
wenn32's user avatar
  • 129
0 votes
0 answers
38 views

GoLang for-loop variable scope change and Table driven testing

As I was reading this blog post: https://go.dev/blog/loopvar-preview about scope of loop variables and as I’m trying to learn #GoLang, I asked myself the question: “okay, but is really so common ...
tarilabs's user avatar
  • 101
2 votes
2 answers
179 views

Where to put interface files for mocking aka what are best practices for organizing interfaces in a C#/.NET Core project with NSubstitute, Moq etc.?

Question I'm working on a C#/.NET Core project, and I'm looking for guidance on organizing interfaces, especially when it comes to using NSubstitute, Moq or other libraries for mocking, because there ...
rklec's user avatar
  • 31
0 votes
3 answers
129 views

Separation of Concerns between test automation engineer and manual QA engineer? [closed]

I've been working as a test automation engineer for almost two years now. As expected, most of my job involves ensuring that the automation (primarily written in Python) is operational and reliable. ...
Aki's user avatar
  • 17
1 vote
3 answers
286 views

How do you test whether schema changes will break services?

I maintain a relational database of sorts, and occasionally a feature request requires a schema change (eg. add a new column, etc...). However, a number of "services" consume this data. It's ...
MYK's user avatar
  • 343
1 vote
3 answers
200 views

TDD - What to do when adding a new function on a dependency causes many previous tests to fail?

I was programming today and encountered something that just feels like I'm doing something wrong (maybe?). I've encountered this situation before, but I wanted to reach out and ask if there's a better ...
jrgilman's user avatar
  • 121
1 vote
1 answer
187 views

Abstracting away small function inside a class for easier mocking during testing

I have a function that looks roughly like this: async function getValue(connection: Connection): Promise<number> { const value = await connection.getValue(); return value < 0 ? value :...
Ahri's user avatar
  • 279
-1 votes
2 answers
260 views

Should this code be made testable? [closed]

My code looks roughly like 40 def send_pubkey( s: socket ) -> None: 41 '''Transmit own public key unencrypted.''' 42 ...
Vorac's user avatar
  • 7,119
6 votes
7 answers
3k views

Test A requires reviewing other files to prove it is correct. Test B doesn’t but has more than one assert

Say you want to test an update capability across a CRUD api. Test A updates a field, queries it, and asserts that it now has the value from the update. Knowledge about the starting value (and that it ...
candied_orange's user avatar
1 vote
1 answer
249 views

Working with a poorly written piece of software as an entry-level developer with no support or documentation [duplicate]

I'm and entry-level developer straight out of college. I am the only developer at this company. I feel the challenges I face are different to most people working with sub optimal or very poorly ...
mpAppProg's user avatar
-1 votes
3 answers
234 views

Connection between code coverage and defects per KLOC

Most of the articles I read state that the average number of defects per KLOC is 10-15 (most of the data seems to come from Microsoft). How does that number correlate with code coverage? If my project ...
ihi's user avatar
  • 9
-1 votes
3 answers
114 views

Code Coverage and Unit Tests nomenclature [closed]

About tests: I have the following view on nomenclature: Unit tests are the kind of testes where you have a function ExtractBacon, where there is a function with an entry parameter Pig and a return of ...
sergiol's user avatar
  • 157
2 votes
2 answers
417 views

Does the "Pyramid of tests" contradict the idea of tests focusing on behaviour?

I am talking about these two testing strategies : Have a pyramid of tests (with many more unit tests than high-level tests), because high level tests are harder to maintain and slower (see also : ...
Tristan's user avatar
  • 207
2 votes
5 answers
540 views

Is it a code smell for a factory to have many methods?

I have a testing project, in Katalon Studio, that uses data classes, called models. This is a conscious design decision. Also a conscious design decision, is the decision to separate the concern of ...
Mike Warren's user avatar
1 vote
2 answers
315 views

Who should perform the validation test, the software developer or the software user?

Who among the two is responsible for validating the software when testing it? Or is it a joint effort? On the one hand, the software developer is responsible for ensuring that the software is built to ...
Yash J's user avatar
  • 59
3 votes
3 answers
796 views

How to write effective automated tests when building GPT4 powered software?

Part of my current product uses GPT-4 with a prompt to extract information from plain text. As behaviour of large language models is inherently opaque and failure cases unpredictable, I was wondering ...
Armin's user avatar
  • 65
-1 votes
1 answer
80 views

Efficient way to write test cases depending on a Micro service

I'm very new to microservice architecture. In the Monolithic app structure, it was pretty straightforward to write test cases since everything was in one app. I have a situation where I manage a ...
Koushik Das's user avatar
2 votes
7 answers
568 views

Is it possible to assess the quality of software if the customer keeps changing what it is supposed to do?

Kind of a yes/no question, if so, how? If the customer is unsure of his requirements and keeps changing them, on what basis are the software testers supposed to test the software to assess its quality?...
Yash J's user avatar
  • 59
0 votes
3 answers
164 views

Is it only for efficiency, running tests on macOS even if the app will never be deployed to macOS?

I'm using a MacBook at work. Per company policy, no other devices are allowed. I am developing a Go application, the production environment is Linux and will be Linux only. But I run tests locally to ...
Jinux's user avatar
  • 11
2 votes
4 answers
2k views

How do you deploy and test a hotfix repo branch in different environments, Git Flow variants

I have done thru where do bug fixes go in git flow and the git flow and github flow pages. There are scenarios many times when we need to show demo of new functionality and on same day fix issues of ...
tgkprog's user avatar
  • 607
4 votes
1 answer
193 views

I'm adding Windows Home support to my client application. How can I perform automated testing?

My team and I publish a client app as part of our solution. It includes a CLI but there are other components as well. Currently most of us develop locally on MacOS, and as part of our CI/CD we have a ...
data princess's user avatar
0 votes
1 answer
499 views

Should I use my View Model to Test my Views in SwiftUI?

I was reading a post about testing in SwiftUI and the author said that don't write unit tests for your View Models that tests the UI of your view. The example he gave was a simple counter app. ...
john doe's user avatar
  • 141
5 votes
7 answers
488 views

How to apply TDD to very high level functionality?

Another name for this question could be: How to TDD the main function? My situation: I'm writing a program from scratch that runs a sort of simulation, and I want to apply TDD to the whole development ...
charlieshades's user avatar
2 votes
2 answers
504 views

Where do unit tests stop and integration tests begin according to the classical school of unit testing?

There are two schools of thought on how unit tests should be written. The first is the Classical/Chicago school, which focuses on the isolation of unit tests, describes a unit as a class or set of ...
B-Rad's user avatar
  • 203
4 votes
2 answers
440 views

How to write maintainable unit tests using classical style of unit testing

When I am using the classical style of unit testing, how do I keep the number of test cases for an object that has many collaborators from growing too large? And how do I keep the setup of each test ...
dbird's user avatar
  • 159
0 votes
2 answers
160 views

Testing an assertion across all test cases

I have recently developed a small module that performs queries against a database. At the end of each test that contains code performing modifying queries against the database, I added an assert that ...
krezno's user avatar
  • 167
0 votes
1 answer
251 views

Testing REST API endpoints. How do I setup the tests?

When writing tests for my FastAPI endpoints I am not sure which is the best way to setup the test (store data in the DB, prepare data for the body of a POST call, etc.). I can either use: direct ...
user's user avatar
  • 469
3 votes
0 answers
75 views

Confused about how to test Python scripts that install and configure a development setup on OSX (VMware? Docker-OSX?)

In my company we hire engineers for various "disciplines"—iOS, Android, Web, Backend, Data, etc. Engineers follow an onboarding workbook to install what they need for their discipline. iOS ...
Andrew Cheong's user avatar
2 votes
2 answers
127 views

How to provide test code for manual testing?

I have written a class that implements some BLE scanning functionality. I have also written some test code that helped me to manually verify my scanner works as intended. Now I want to somehow ...
LWChris's user avatar
  • 129
0 votes
1 answer
309 views

How to E2E test handling of an unknown error in a client-server application?

Using a ton of libraries, IO, ... you cannot handle all imaginary errors. You will need some form of "catch uncaught exception" handling to still have a control flow for such a case. But if ...
Spenhouet's user avatar
  • 109
0 votes
1 answer
525 views

What should you unit test in (external) service driven architecture?

My system consists of 4 seperate layers. API layer Application layer Infrastructure layer Core layer System is not Domain Driven. It contains no entities with domain logic. All models are anemic. ...
OverflowStack's user avatar
0 votes
2 answers
234 views

should a single end-to-end test aim to validate a scenarios or a specific feature of an application

I am currently working on a web product where we have a testing strategy that includes end-to-end testing. Our tech lead is of the opinion that each e2e test should only validate a single feature. For ...
Joulin Nicolas's user avatar
0 votes
1 answer
185 views

How to create useful tests for fixed byte values

I am working on an android application with Bluetooth iot devices. Theses devices sends broadcasts periodically in the form of 30ish bytes containing various information. Some of the bytes have ...
Lionel Briand's user avatar
0 votes
3 answers
180 views

Tests of 1-Dependency VS Tests of 0-Dependency

How many dependencies does a unit test have (that are not mocked)? My understanding is that a true "unit test" has zero dependencies, with all of them mocked (or none in the first place; ...
Dave Cousineau's user avatar
2 votes
1 answer
205 views

Test coverage for various code logic permutations... Metadata/Artifacts in algorithm results to describe which case?

I'm sorry if the title is confusing, I don't know if what I am describing has a proper name so let me describe... I have an algorithm which contains quite a bit of nested if/else if/else logic for ...
Mr. Boy's user avatar
  • 231
3 votes
2 answers
299 views

the actual notion of an integration and end to end testing

I want to know how rigid do we have to stick to the notion of end to end testing, please consider the following explanation: Basically, when we talk about end to end test we send a request and expect ...
mleko's user avatar
  • 47
4 votes
5 answers
1k views

When mocking a class in a unit test, how should I handle dependency classes that have multiple similar get methods?

Let's say there's a class that processes text, and it gets that text from another class as a buffer. If this buffer class has multiple get methods, like readLine(), readChar(), readCharCode(), how ...
krazune's user avatar
  • 41

1
2 3 4 5
30