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
36 views

Best way to keep development and testing in synch

We have 1 frontend developer and 2 backend developers and 1 QA. QA is responsible for writing the end-to-end tests using Cypress. FE developer writes the unit tests. Backend developers write the unit ...
-2
votes
0answers
28 views

How to improve the service design to test it easily

I facing some issues trying to design a good solution for this context: there is a complex car entity (many properties and many entities linked) similar to an aggregate root I have to calculate the ...
3
votes
1answer
83 views

Efficiently updating a common repository used by multiple other repositories

Suppose we have a project consisting of many microservices, all of which use a common library. The common library has been put into a separate git repository, and each microservice is also in its own ...
19
votes
5answers
2k views

How to test variable values which differ due to floating point inaccuracy caused by different DBMS types?

I am working on a program that needs to work on floating point values that are fetched from different database types: currently we support 12 different DBMS (for example, two of them are Sqlite3 and ...
0
votes
0answers
42 views

Idiomatic Golang Unit Testing

Currently I have some code which is structured like this: type Service struct { // some dependencies } func (s *Service) FindStuff(ctx Context) { // this signature cannot be changed // some ...
-2
votes
1answer
25 views

What should be the workflow for test management in JIRA

We are using Jira to track all our tickets and confluence for documentation. We intend to document the test cases covered on Confluence. Here are a couple requirements: Consider a development ticket ...
1
vote
1answer
189 views

Should I cover code that should not be able to fail with tests?

I'm asking myself above question since I implemented an API that accesses a third-party API and currently write tests to increase my code coverage in the class that communicates with the third-party ...
-1
votes
2answers
161 views

How do you unit test methods with hard/impossible inputs to hardcode?

I have the following problem. I have a method which takes two other custom objects to work. This objects are required by the method because they have the information that the method requires to ...
-1
votes
1answer
36 views

Gitflow - Share release branch executable with tester before tagging it

I use GitFlow as a workflow for versionning for less than 1 month. I've just finished to develop a feature branch which has been merged to develop/. Now, I'm starting a release branch from develop. ...
1
vote
1answer
97 views

Which git workflow for micro-services and testing

I would like to know what best practices exists out there with regard to micro services, CI/CD, testing and Git workflow, especially the way of working given the constraints that a) nothing should ...
0
votes
2answers
95 views

How to address a common problem with automated testing on remote machine

CI/CD options such as bitbucket pipelines and github actions make use of virtual machines called runners. Changes in source code trigger the runners, which in turn trigger a set of commands. The ...
-4
votes
2answers
96 views

What is the most complete way to test an imperative function?

What is the most complete way to test an imperative function? By "complete" I mean, something that is robust, that tests all the edge cases of the function, that so much as "proves"...
-4
votes
1answer
53 views

How to classify White-box/black-box, systematic selection and random selection of test case strategies

While writing my thesis, I am facing the problem of how to classify the testing strategies. Following section 1.5 of this thesis: If black-box and white-box are test case selection methodologies to ...
-3
votes
3answers
103 views

How do you test that an API wasn't broken by a change?

I have an infrastructure package that multiple projects depend upon. This package is supposed to be a stable API shared by those projects. I want to know if a change made in the package has broken ...
13
votes
3answers
2k views

How would you test a lexer?

I'm wondering how to effectively test a lexer (tokenizer). The number of combinations of tokens in a source file can be huge, and the only way I've found is to make a batch of representative source ...
6
votes
3answers
235 views

Is there a better way to run sequential tests?

I'm using unittest framework to run Python tests. Some system tests consist of a series of steps for a given scenario, and they need to run in a specific order. For example, I have a client ...
-2
votes
1answer
68 views

Does the higher-level testing mentioned in the book “Working Effectively with Legacy Code” belong to integration tests?

In the book Working Effectively with Legacy Code , there is section Higher-Level Testing in Chapter 2 Working with Feedback: Unit tests are great, but there is a place for higher-level tests , tests ...
-1
votes
2answers
83 views

How to test a web service / API?

Our product is a C++ server component implementing a REST API. We have automatic tests that check whether the responses are byte-identical to the reference. The new requirement that came in is that ...
0
votes
0answers
30 views

What is the best way to easily tamper with request data for purposes of vulnerability testing on a web site?

When developing web pages, it's often critical to test and verify that the application is protected against various forms of bad input, even if the front end offers some discouragement against the bad ...
1
vote
1answer
91 views

C# - Menu Implementation - Help writing it in a testable way

The Question: I'm developing an app in C# and am currently designing a menu which contains submenus and needs to be different depending on the category of the user. I've written the code but am ...
2
votes
3answers
183 views

How can I avoid chasing my own tail when testing against complicated return values?

Sometimes there are functions that return complicated data and cannot be divided any further e.g. in the area of signal processing or when reading and decoding a bytestring to another format. How am I ...
2
votes
1answer
92 views

How much of the frontend functionality should be mirrored in the API?

QA here. Relatively new to API testing (manual). Thought I'd turn to the experts to try and figure out if my expectations around how much functionality should sit in the API are more or less valid. ...
1
vote
1answer
89 views

Should snapshot tests compare against stored test data or data from a database?

I have a method GetReportAsync that takes one XML and generates another: public async Task<string> GetReportAsync(string id) { // Get Order.xml from a file database var order = await ...
2
votes
1answer
79 views

Improvements to test architecture for faster testing

Pandoc is a command-line tool and Haskell library for converting between many different markup and document formats. One of the ways Pandoc's behavior can be customized is via filters -- Pandoc ...
1
vote
1answer
71 views

Identifying Risks/Gotchas When Using Static

I am intending to come from the perspective of development choices, code reviews, and general testing against defined environments (Development, Test, Production, etc.). I will be using C# as the ...
3
votes
2answers
251 views

Should tests for frontend test for impossible situations?

I am cruising through a situation where I am my own backend and fronend developer. Let's say I have a basic backend API with some call /register/{area}. The {area} piece is dynamic and can change. Now ...
-1
votes
2answers
66 views

When writing tests against the database, should the test to create a resource also retrieve the resource to check the values were correctly inserted?

Where I work, we have some integration tests which spin up a new SQL database instance in Docker, so that we can test the repository logic for write actions as well as read actions. We have a test for ...
0
votes
0answers
47 views

Large regression test suite and version control [duplicate]

I'm developing a software tool with command line interface. Our team has corresponding regression test suite consisting of ~1000 test cases, which is definitely not a huge number. Each test case ...
0
votes
2answers
58 views

How to cover by tests HTTP API wrapping library

As mentioned in title, I don't understand how I supposed to cover by tests code which is just wrap http api. I guess I can write only unit tests, because wrapped service is paid. Integration tests in ...
1
vote
2answers
122 views

Is there a pattern for unit/integration testing where tests that are higher level are intended to act as “gates” for other more specific tests?

The motivating concept here is that the fewer tests you have, the faster your test suite runs. This kinda feels like I'm basically describing smoke tests, but I think smoke tests and other tests are ...
1
vote
3answers
91 views

Should simple helper functions be used to consolidate function calls in test code?

We have test code like: clickElement(a); clickElement(b); clickElement(c); that's repeated in many places, where clickElement is called 1 to 5 times in a row. Should we make a helper function to ...
0
votes
1answer
59 views

Properly testing UI presenters without duplicating tests of subcomponents

I am writing the embedded firmware for an effect pedal. The pedal's ui consists of a few knobs a few buttons and a few leds and it consists of various control modes each corresponding to a seperate ...
1
vote
2answers
433 views

What's the best way to get GitLab Docker runners and Python tox to work together?

I'm trying to get a better understanding of how tox and GitLab CI (with docker runners) would work together, as they seem to have a bit of overlap in what each does. I think I may be missing something ...
2
votes
1answer
96 views

Do kotlin libraries with inline APIs encourage high coupling and discourage unit testing?

As an example, let's assume our application needs some way to communicate with other systems using HTTP. interface HttpClient { fun <T> get(url: String, returnType: Class<T>): T fun ...
1
vote
2answers
186 views

Can a build system be used effectively as a unit test runner?

The way of running automated tests (specifically, a large number of small, «atomic» unit and regression checks) that I am used to is to maintain a monolithic executable built on top of a test ...
-1
votes
1answer
182 views

Java: Splitting a large unit test class

The project (Java/Spring) I currently work on has a rather large unit-test class for one of its services : more than 1000 lines, several Nested class (one per big functionality), some tests without a ...
0
votes
2answers
90 views

Unit testing multiple features in one test

I'm writing a small utility class to create an abstraction for addEventListener (JavaScript/DOM) Let's say I have to test for these features: Single event target with a single event Multiple events ...
53
votes
11answers
11k views

If two individual branches pass unit tests, once they're merged, is the result also guaranteed to pass unit tests?

Suppose we have two branches A and B which have been forked from master. Both branches A and B make some changes and implement some unit tests. They pass all current and new tests, then are merged ...
3
votes
0answers
1k views

Should I mock ObjectMapper in my unit tests?

I have different services in a spring application that have a dependency on Jackson ObjectMapper, the unit tests rely on @InjectMocks to inject all the various dependencies to the class that is under ...
0
votes
1answer
54 views

Draw Data Flow Graph with Constructor and Functions

I am new to software testing and would like to know whether it's appropriate to draw a data flow graph that flows from initiation of variables to constructor and method. Is there something wrong with ...
1
vote
2answers
139 views

C++ Organizing classes for easy unit testing (but with some restrictions)

Mild pickle. I have a project which has components that are difficult to test/mock. It might look something like this: class Contenxt; class Server : public SomeOtherClass { public: ServerPlugin(...
1
vote
1answer
99 views

An effective way of finding regressions

There is a rather large data flow engine - more than 2000 different flow definitions of "what to do with inbound data". The engine deals with various data formats (flat-file, CSV, JSON, XML, ...
0
votes
2answers
280 views

What is the correct way to unit test methods that mix dependencies and business logic?

I'm struggling to come to a consensus on the right approach that can be used somewhat consistently to balance integration and unit testing. Take the following method, that is extremely common to find ...
2
votes
2answers
295 views

Unit Testing Controllers without Mocks

I've done a lot of test writing using Mocks, and so I've learned that it makes refactoring difficult due to implementation coupling inherent with Mocks. I've done a lot of reading on the topic tonight,...
-1
votes
1answer
56 views

How to create input data for unit tests for an API client?

I am building the initial set of unit tests for my team's legacy API client system. We have been writing integration tests, but have no unit tests. It's a Sinatra server that accepts requests from our ...
-2
votes
2answers
381 views

In unit testing should I check if a method is being called or just check the result?

Suppose I have similar function: Helper2 helper2; public void myFunc(Helper helper) { if (....) helper.mySecondFunc(); else helper2.myThirdFunc(); } In my unit test should I ...
0
votes
2answers
334 views

Unit testing private methods

preface: I know this topic has been asked about a lot on here in the past. Hopefully I will make it clear that I've read a fair amount of the questions/answers on the topic, and other literature, too. ...
3
votes
1answer
55 views

How to test channel pipelines in Go

I use the "channel pipeline" pattern quite a lot in Go, which looks something like this: // getSomeNums spits out ints onto a channel. Temperatures, pressures, doesn't matter func ...
27
votes
8answers
5k views

Does software which implements scientific models require unit tests?

I work in a field where lots of code is written, but hardly ever tested. This is because we are foremost scientists who try to solve problems with code. The few coding courses we had, focused on the ...
0
votes
3answers
65 views

How to arrange expected result model for test in a cleaner,readable way when the model contains many properties

In one of my projects I saw wrapping the expected results as a static variable in non static class. The reason for doing so is to make the code more readable, so that the massive expected result model ...

1
2 3 4 5
27