Questions tagged [testing]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
46 views

Page Object Model: Relationship between a page object and a driver

There's a question that struggles me for a long time already and so far I couldn't find or figure out a good answer. Hopefully, you will help me with that, folks. Before the story, a little background:...
0
votes
1answer
186 views

How to make the tests run faster?

I develop my current project with a very strict approach to TDD and try to make it as close to Kent Beck's TDD By Example book. So right now I've got code coverage of 93%, with 1290 unit test cases, ...
2
votes
2answers
86 views

How to increase confidence in changes without a great test suite?

I've worked on a few codebases without a great automated test suite, where changes that concern the whole platform have to be thoroughly tested by developers and there would be a high risk that a ...
-3
votes
1answer
131 views

Shall QA team share their Test Cases with Dev Team? [duplicate]

I am building the test process for my development team. Currently, we have multiple ping-pong scenarios between Dev and Test teams. to send the product to QA then QA find issues and return them to ...
0
votes
1answer
366 views

What's an edge case in email validation, and algorithms?

An edge case is usually defined as what Wikipedia would say, An edge case is a problem or situation that occurs only at an extreme (maximum or minimum) operating parameter. For example, a stereo ...
0
votes
2answers
88 views

Automating performance tests for python code in a CI

My apologies in advance for a question that might seem trivial - I am a mostly solo dev in academic environment and a lot of industry best practices don't necessarily make it here. Several of my ...
-3
votes
2answers
79 views

How much should a react frontend application be automated tested? [closed]

I'm backend developer working on a very backend heavy application. So most of the business logic is writen in the backend. In our project we are considering a full rewrite of the frontend. Currently ...
-3
votes
1answer
150 views

How to simulate test data to a database?

I've created a service application that import orders from an SQL database. Right now I'm manually entering the data into the database, but in release a 3rd party application will export orders to the ...
-1
votes
1answer
78 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 ...
3
votes
1answer
162 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 ...
20
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
121 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
218 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
204 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
289 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
38 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. ...
2
votes
1answer
208 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
107 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
58 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
110 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 ...
14
votes
3answers
3k 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
521 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
70 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
105 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
32 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
100 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
191 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
95 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. ...
0
votes
1answer
120 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
80 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
75 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
286 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 ...
0
votes
2answers
78 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
2answers
60 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
136 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
226 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 ...
-1
votes
1answer
61 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 ...
3
votes
2answers
1k 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 ...
4
votes
1answer
118 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
229 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
441 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
127 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 ...
56
votes
11answers
12k 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 ...
4
votes
1answer
4k 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
70 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
305 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
104 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, ...
1
vote
2answers
415 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
462 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
2
3 4 5
28