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.

0
votes
0answers
75 views

Implications of using GPL licenced code only during testing [migrated]

Let's say I'm working on a software library in which certain unit tests rely on GPL licensed code but the code that a user of this library would install on their system does not interact with GPL ...
-5
votes
0answers
41 views

How to find optimize algorithm? [on hold]

I am a beginner in learning algorithm. My question is; Is there any way to optimize & correctly match the electrical appliances, and how to find bug or errors easily? Thank you.
0
votes
0answers
12 views

Clean tests in Scala Akka

I am new to Scala and Akka and struggle with testing persistent actors in scala. Right now, we have tests like this (Bank Account example): import akka.actor.ActorSystem import akka.persistence....
19
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 ...
0
votes
0answers
40 views

How do you test a system using real network traffic?

We have a system which mainly works with requests coming from the internet. The system relies on real traffic, IPs, countries, regions, carriers, and also a set of random fields embedded in the ...
3
votes
3answers
176 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
56 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
180 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
110 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
126 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, ...
4
votes
2answers
419 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
0answers
57 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 ...
0
votes
0answers
38 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
54 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
221 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
127 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
83 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....
2
votes
3answers
315 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
215 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
58 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 ...
1
vote
3answers
167 views

Automated test “all changes are feature-flagged”, possible?

Let's say in an effort to improve quality, your team agrees on the following policy: all commits to the master branch (direct or via pull request) have to be categorized as either bugfixes or ...
-3
votes
1answer
90 views

test class that include another class - Only one test or both

i have a sytem a that include system b and return the result. simple!. concrete example an API, one controller that internally call another class then perform the operation. route --> controller ...
0
votes
1answer
82 views

How to Automatically Tell What is Not Tested [duplicate]

I feel like I've heard the phrase "Automated Test Coverage" but not really sure what it means. I am wondering if there is a way to do some sort of program analysis that will tell you which parts of ...
1
vote
0answers
31 views

Integrating Testing with Model Checking

So with Model Checking you have a specification and the model checker automatically goes through your program's states and checks if it matches the specification. What I don't understand is where ...
-1
votes
3answers
170 views

Should one be able to access a db during tests?

I had a conversation with a colleague about tests. They want to be able to access a db that is only accessed by tests. The db is created in memory and deleted after tests are done. My colleague wants ...
67
votes
16answers
15k views

How to avoid logical mistakes in code, when TDD didn't help?

I was recently writing a small piece of code which would indicate in a human-friendly way how old an event is. For instance, it could indicate that the event happened “Three weeks ago” or “A month ago”...
7
votes
4answers
555 views

What's the practical development cycle of a large project when a full build is prohibitively long

Projects like webkit, Linux kernel and many others take over ten minutes if not hours for a full build. What's the practical development cycle for these large projects? Specifically, how does a ...
0
votes
1answer
97 views

How to load test Publisher/Subscribing queue?

I am trying to load test a queue that works on a pub sub pattern and can't figure out how response time is to be calculate and the TPS(transactions per second). Problem statement : The pub sub ...
3
votes
5answers
601 views

If 100% test coverage is possible

In thinking about formal verification techniques, you also need to have test coverage. But as that article shows, you can easily say you have "100% test coverage", but every test doesn't have any ...
2
votes
0answers
49 views

Designing a test system on server/message level for large legacy application

I am working on introducing tests to an old system. Because of the amound of technical debt, we have landed on component/interface testing. The system is a servies of servers which sends messages in ...
3
votes
2answers
171 views

Is conditional dependency injection based on environment a bad pattern?

Is it a bad design if we inject dependencies based on the running environment (production, testing, development, etc)? Consider the following container in Laravel as an example: $app->singleton( ...
0
votes
1answer
105 views

How to test controllers in a REST applications

I'm writing a REST api backend in NODE js, which is based on MVC approach. My api routes directly hit the controllers, which in turn import models which are a wrapper around the methods from a library ...
2
votes
3answers
222 views

Should I test the debug branch of my code in a unit test?

Lets say I have a function that gets a list of what files to send that are later send over a socket to some other pc. Now usually I keep track of what files have been sent and don't send these files ...
1
vote
2answers
200 views

How do you unit test a microservice that makes a call to another microservice?

I have a suite of microservices: ConnectorRegistrar ConnectorTypeA ConnectorTypeB ... ConnectorTypeZ "Someone" can make a call to the ConnectorTypeA microservice to create a connector of type A, and ...
-1
votes
1answer
103 views

what is the meaning of infection in mutation testing?

I got the following code: in the textbook that I am reading it says that for an infection to occur, mutation delta 1, it should be that the value of A must be different from the value of B. At this ...
0
votes
2answers
109 views

Testing an underwriting engine

I made a post in relation to this question on the SQA here but thought I would post on this board as it's more active. I'm testing an underwriting engine with a front-end interface that asks a ...
1
vote
1answer
49 views

Keeping Stubs in Sync?

If I want to test frontend code (e.g. react SPA) that queries the backend and I stub out the responses from the backend using sinon fake server/fake XHR, then what happens if the backend code changes? ...
0
votes
3answers
152 views

Unit Testing method with multiple steps

I have a validation method like this def validate(a, b, c, d, e, f): Boolean = { val rs1 = check1(a, b) val rs2 = check2(c, d) val rs3 = check3(e, f) rs1 && rs2 && rs3 } I ...
0
votes
4answers
246 views

Is there a “DevTest” or “DevQA” equivalent to “DevOps”?

I understand "devops" to be the application of the development processes (issue tracking, version control, release management...) to operations tasks (deployment, migration...). Is there an ...
0
votes
0answers
57 views

How to define equivalence classes for an input domain?

Lets say a persons commission is computed from the following: 10% on sales <= 100 dollars 20% on the next 100 dollars 30% on any sales > 200 dollars We have an input of three ...
6
votes
2answers
197 views

Is there a viable approach to testing for a negative in a safety critical codebase?

Given a requirement like if A and B and not C then D must happen within 10ms That can clearly be tested albeit at the cost of some pain proving the 10ms bit, but what happens if the requirement was ...
-2
votes
1answer
73 views

What is meant by “every branch” in testing coverage criteria?

I have generated the program graph of a method that contains an if condition and a for loop, and I need to generate test cases that covers "every branch". Would this include the for loop, given that ...
0
votes
1answer
68 views

Client-Side TDD Tests?

More specifically, with regards to ATDD (sort of BDD flavored, or some could argue what was actually intended in the first place by TDD) should be there much UI testing? As I have been testing my UI ...
8
votes
2answers
339 views

Philosophy on unit testing daisy-chained methods?

Problem Statement: I have a class that does some validation and it looks something like this: func a() {b()} func b() {c()} func c() {d()} func d() {e()} func e() {return} This is a simplified view,...
1
vote
1answer
86 views

Testing Client-Side Code w/o Introducing Brittleness

I'm finding it tough to test my client-side code without testing implementation details. For example, lets say you are testing a login form that displays client-side validation errors and does not ...
-2
votes
1answer
45 views

Is Python Doctest a White-Box or Black-Box technique

I have read many articles explaining the overview of black- and white-box testing, including this Stack Overflow question: https://stackoverflow.com/questions/7258524/unit-testing-black-box-testing-...
3
votes
2answers
81 views

White Box Testing vs Trace Tables

I've seen trace tables listed under white-box testing in one part of my syllabus, and separately under dry-run testing in another part. Could anyone please clarify whether trace tables are generally ...
2
votes
1answer
44 views

Functional tests for SVN management script

I have a Python script which is responsible for updating SVN repository (in a nutshell) and checking it. Now I'd like to write some functional tests for the script. To check whether SVN update has ...
0
votes
0answers
44 views

What are some good approaches for running end-to-end test with complex data?

Consider we have a system that is made out of 3 modules. ModuleA is dependent on some data which it's responsible for creating ModuleB is dependent on data which is created in ModuleA ModuleC is ...