Stack Exchange Network

Stack Exchange network consists of 174 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.

-4
votes
0answers
38 views

Best Practices for testing of business intelligence dashboards [on hold]

can anyone provide recommendations, best practices or frameworks for testing the user interface layer of business intelligence dashboards (i.e. QlikSense or Tableau). By user interface layer I mean ...
1
vote
1answer
166 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 ...
-3
votes
0answers
35 views

Is there a term for a catalog of fakes, mocks and stubs that are preconfigured?

Let's say I have a user object... and there are a certain subsection of tests that always for example, want an "admin user" and others want "moderation users" ... or we want users with unicode names ...
-2
votes
1answer
54 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
190 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, ...
0
votes
2answers
83 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
30 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
143 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
433 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
63 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
319 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 ...
1
vote
1answer
76 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
28 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 ...
1
vote
1answer
90 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
279 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
67 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
47 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
214 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
133 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 ...
64
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
92 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
34 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 ...
-3
votes
1answer
29 views

What is an integration test pattern for an extensible permutation of cases (e.g. dimensions of seed data and filtering by said dimensions)?

Suppose we have a service that returns users in certain categories, e.g. Listens to a certain artist. Listens to a certain playlist. Listens to a certain genre. Is between ages X and Y. Is located in ...
2
votes
2answers
126 views

malloc on different platforms

I am testing a red-black tree implementation (repository) and I find that with Windows 10 and gcc, malloc starts returning NULL after inserting approx. 50 million nodes but on Linux it works at least ...
0
votes
1answer
76 views

Git branching model for teams with develop, test and deploy phases

A developed piece of code goes these phases in our team: Developers write the code Then they send it to testers If tests pass, then testers send the change/new feature/bugfix to operations team for ...
-2
votes
1answer
51 views

Understanding property based testing

I'm reading about property based testing and I'm wondering how can I test this my code using that paradigm. class Invoice { private final String id; private final String companyName; ...
0
votes
1answer
125 views

Is this wrapper class too simple to test?

I have a following class in my PHP code: <?php declare(strict_types=1); use function Http\Response\send; use Psr\Http\Message\ResponseInterface; class ResponseSender implements ...
0
votes
0answers
93 views

How to debug Icalendar URL in Google Calendar

I'm developing a ICalendar service. If i add the URL in outlook everything looks correct, but if i import the URL in Google calendar it does not show the description of event. As google calendar ...
8
votes
3answers
497 views

Is it possible to programmatically evaluate safety for arbitrary code?

I've been thinking a lot lately about safe code. Thread-safe. Memory-safe. Not-going-to-explode-in-your-face-with-a-segfault safe. But for the sake of clarity in the question, let's use Rust's safety ...
9
votes
4answers
585 views

Refactoring - is it appropriate to simply rewrite code, as long as all tests pass?

I recently watched "All the Little Things" from RailsConf 2014. During this talk, Sandi Metz refactors a function that includes a large nested if-statement: def tick if @name != 'Aged Brie' &&...
0
votes
1answer
69 views

Unit tests involving library functions and objects

I am making a project using the Laravel framework. I plan to create unit tests for my project. But I feel I don't really have an idea what to test because I mostly use library or framework functions. ...
0
votes
4answers
230 views

What exactly caused the recent increase in automated testing?

Recently I've heard a lot about automating test is taking away manual jobs from the QA sector. When I look at example of what it is about most of it is just running a sequence of functions over and ...
22
votes
6answers
1k views

continuous integration for scientific software

I'm no software engineer. I'm a phd student in the field of geoscience. Almost two years ago I started programming a scientific software. I never used continuous integration (CI), mainly because at ...
3
votes
3answers
214 views

Does Defect density measure QA or DEV effectiveness?

Most Defect density metrics are like this: Number of bugs / Size (KLOC, Story Points, Function points..) I have read that it measures the effectiveness of QA but I do not get it: I can have a ...
1
vote
1answer
92 views

Mutation Testing - Exceptions and Infinite Loops

I'm writing a mutation testing system for Clojure and I was wondering what the general consensus is for when a test causes a mutant to throw an exception or enter into an "infinite" loop (my system ...
2
votes
4answers
223 views

Only test when necessary in agile software development: good or bad idea?

When taking an agile development approach, it is obvious to only implement features when necessary. My question is: can the same be applied when it comes to testing, i.e. creating test cases and only ...
-1
votes
1answer
138 views

How to ramp-up software testing from zero on a code base of approximately six years of development and in a team without practical knowledge?

In a feedback for a (deleted) question I asked here last year, I was also told that there is not easy way to do software testing. We may find prepared test cases for protocols but in most case the ...
-3
votes
2answers
152 views

Is there such thing as minimum testing required when building a software?

As far as I know, ideally testing should be done extensively as hard and far as possible, however sometimes (always) we are required to ship quickly. In case of a delayed or a over-deadline projects, ...
5
votes
2answers
442 views

Should I be unit testing during prototyping/preparing for beta?

I am developing a web application for an industry that desperately needs it. Working with a consultant in the industry, I’ve rapidly developed a prototype in 2 months that we will be testing with a ...
1
vote
1answer
75 views

How to test customer journey with mostly the same structure

I often hear that a test should contain only one assertion (Disregarding testing attributes of a class) and where the whole pre-conditions for the test should be setup before the assertion. In our ...
1
vote
0answers
40 views

Unit testing multiple values [duplicate]

If I create a function to calculate the square root of a number, I suppose i should write a single unit test (maybe two, to test how it handles negative numbers). But what if I have a function which ...
1
vote
2answers
83 views

How to setup data for service tests

We are trying to work out the best way to setup test data when we run our isolated functional tests. These tests test just the service and mock out other dependencies and use an in memory database. ...
3
votes
4answers
257 views

Should outgoing messages from object under test be tested?

I was watching a recording of a conference by Sandi Metz on testing. One of the things that I struggled with was that she said not to test outputs of the object under test (her example was query ...
4
votes
2answers
154 views

How could a test engineer aid test-driven-development in continuous integration?

In an environment where you can't merge code that fails tests you obviously can't merge new, failing tests. But how to deal with a newly found bug exploit, meaning you wrote a new test exposing an ...
0
votes
0answers
32 views

Calling other methods in unit test [duplicate]

I was learning about test driven development and came across unit testing. I have few questions regarding testing a class containing several methods; assuming i consider each of these methods a unit ...
1
vote
1answer
85 views

A performant and robust way to reset multiple files to its original state (TDD)

In our automated Java tests, we sometimes encounter issues, such as: Test A creates a custom file A.sh, that is then added on classpath Automated testsuite cleanup does not know about random file A....
6
votes
5answers
618 views

How far should I go with dependency injection and mocking?

Say I have a following class: public class A { public void execute() { if (something) ThirdPartyApi.method(); } } Now, I would like to test in particular the execute() method. I ...
0
votes
2answers
219 views

How can I test generated assembly?

I'm working on a C compiler for Linux for the purpose of personal curiosity/fun. How can I test the generated assembly before the compiler is complete enough to do anything useful? For example, if I ...
-1
votes
1answer
59 views

Check files after git push, or; best practices for github after push tests

Sometimes our developers push -simple to find- mistakes to our repos, like a missing ";" a "console.log" that is not suppose to be in the main branch, or an invalid json file. With Github you can add ...