Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
2 answers
557 views

Integration test for a script that writes a YAML file

I have a script bin/create_workflow_input.py that is part of a larger application that launches bioinformatics workflows. The script itself (not shown) writes into ...
Timur Shtatland's user avatar
4 votes
1 answer
125 views

Creating Dedicated Database for database test cases (Tests that I need to check the data are written or read sucessfully) in phpunit

I am making a base test class that bootstraps database Test cases ...
Dimitrios Desyllas's user avatar
1 vote
1 answer
69 views

A test class for a REST application

Here's a suite of integration tests for my REST controller. Among other things, it reflects my efforts to reduce code duplication First, I introduced some class fields. ...
Sergey's user avatar
  • 615
3 votes
1 answer
138 views

End to End testing of user interaction in Rust

I am interested in any kind of possible improvement to this method of testing a Rust program with user interaction in an end-to-end manner (simulating user input and asserting a certain program output ...
Caridorc's user avatar
  • 27.6k
4 votes
2 answers
2k views

Clean up directories and files when a unit test fails

While running unit tests (most of them integration tests) with Python I create some directories. They need to be deleted after the test or when the test fails. The execution of the cleanup code need ...
buhtz's user avatar
  • 209
1 vote
1 answer
71 views

Volunteer registration website Selenium testing

I have a volunteer registration website that I wrote some end-to-end tests for in Selenium. Selenium is of course software that lets you automate clicking around a browser, which makes it great for ...
RedDragonWebDesign's user avatar
0 votes
0 answers
508 views

MS Playwright Page Object Table Data Selector(s): Is there a simpler solution?

I'm writing some function tests and wrapping a Microsoft Playwright (it's similar to Selenium for those unfamiliar) IPage with a page object containing some helper ...
agartee's user avatar
  • 109
1 vote
2 answers
110 views

WaitFor method for website automation testing with Selenium WebDriver

I am trying to use Selenium for website automation testing tasks and I am new to Selenium testing framework. The the situation I faced is to wait the website components loading and then do the related ...
JimmyHu's user avatar
  • 5,550
3 votes
1 answer
89 views

remote file follow using python

I've created an on-demand class that can be initiated to collected any new data written to file from start_recording call until ...
Zohar81's user avatar
  • 153
1 vote
1 answer
44 views

Simple login test, translated from java to python

I'm reading on how to write proper testing suites here. So I'm trying to follow the selenium example in the docs which is in Java; I'm trying to translate it to Python since my app is written in ...
Tom's user avatar
  • 241
5 votes
0 answers
101 views

SmartUnit: Unit Testing with DI

I was thinking about how unit tests require you to manually instantiate all your dependencies, even though many of them are the same for every test or don't really matter (such as logging, where ...
Hosch250's user avatar
5 votes
0 answers
167 views

Using an extra mock simply to take advantage of the behaviour observation tooling

I'm writing integration for a project, but our framework doesn't provide any ability to inject dependencies, so I've written tests with a unit testing framework (GTest) and used a mock (GMock) in an ...
Matt's user avatar
  • 151
6 votes
1 answer
4k views

Simple HttpClient usage for integration tests in .NET Core

I have this simple setup for a .NET Core project which is just a very basic HttpClient usage to do some simple integration tests to a RESTful API. For now the test project remains separated from the ...
Felipe's user avatar
  • 61
2 votes
1 answer
154 views

418 I'm a TeapotServer for RESTful integration-tests

I created a test-server for RESTful integration-tests that I call TeapotServer because I like the status-code 418 that the ...
t3chb0t's user avatar
  • 44.3k
1 vote
1 answer
66 views

Creating a real unit test in Karma for Angular code [closed]

This is a piece of test code made for the Angular application. The router object is a mock provided by the RouterTestingModule dependency. I wonder if such a test can be considered a unit test (...
Jelly's user avatar
  • 23
4 votes
0 answers
121 views

Scheduler built with observables v3 (follow-up) - now testable

This is a 2nd follow-up to my previous one about a Scheduler built with observables. Although the last one was working correctly, it was only possible to see this ...
t3chb0t's user avatar
  • 44.3k
2 votes
0 answers
43 views

WordPress plugin for shipping calculation

I am writing a WordPress plugin that allows shipping calculation on the product page. Originally, shipping calculation is only available in the cart. To calculate shipping costs on product page, ...
Lucas Bustamante's user avatar
7 votes
1 answer
2k views

Red-black tree in C

I would like to verify that the code fulfills the specification of a red-black tree or receive suggestions for improvements. ...
Niklas Rosencrantz's user avatar
5 votes
0 answers
103 views

Testing application stability by throwing random diagnostic exceptions

I'd like to be able to better test application stability. Usually when you're doing this, you run the application and keep your fingers crossed that it won't crash when an error occurs (be it a ...
t3chb0t's user avatar
  • 44.3k
4 votes
0 answers
50 views

JSON Test Harness: Part 4

Part 1: JSON Test Harness: Part 1 Part 2: JSON Test Harness: Part 2 Part 3: JSON Test Harness: Part 3 Time to review some test harness code I have written. https://github.com/Loki-Astari/...
Loki Astari's user avatar
  • 96.6k
3 votes
0 answers
33 views

JSON Test Harness: Part 3

Part 1: JSON Test Harness: Part 1 Part 2: JSON Test Harness: Part 2 Part 4: JSON Test Harness: Part 4 Time to review some test harness code I have written. https://github.com/Loki-Astari/...
Loki Astari's user avatar
  • 96.6k
5 votes
0 answers
46 views

JSON Test Harness: Part 2

Part 1: JSON Test Harness: Part 1 Part 3: JSON Test Harness: Part 3 Part 4: JSON Test Harness: Part 4 Time to review some test harness code I have written. https://github.com/Loki-Astari/...
Loki Astari's user avatar
  • 96.6k
5 votes
0 answers
74 views

JSON Test Harness: Part 1

Part 2: JSON Test Harness: Part 2 Part 3: JSON Test Harness: Part 3 Part 4: JSON Test Harness: Part 4 Time to review some test harness code I have written. https://github.com/Loki-Astari/...
Loki Astari's user avatar
  • 96.6k
2 votes
1 answer
60 views

Dockerfile + CI for C build

I recently built a CI for my course project in C. I made 3 stages, to build docker image, compile my C sources and run the said project. That said, i think i could've do way better here but i don't ...
Artandor's user avatar
  • 121
0 votes
1 answer
80 views

Clean implementation of FTP File Cleaners

I was refactoring some of my utility code modules used in my test projects, and wanted to apply my knowledge of clean OOP design patterns and SOLID principles to make these modules more useful and ...
Shervin Shahrdar's user avatar
2 votes
0 answers
348 views

Unit/Integration Tests for Maven plugin that creates Skipper packages

I am writing an extension to a maven mojo (spring-cloud-skipper-maven-plugin) and I am now writing tests that interact with a skipper server. However, getting the ...
Menelaos's user avatar
  • 251
4 votes
0 answers
104 views

UI testing for a web application, with variant scenarios

I'm pretty new to software testing and am currently working on a cloud-based web application. Briefly, the application uses: Ext JS as a framework Bryntum's Siesta framework for testing Currently, ...
Nuri Engin's user avatar
3 votes
1 answer
3k views

Implementing integration tests in ASP.NET core using InMemory database

I am building a web application using ASP.NET core. Most of the tests in my application are unit tests, so I mocked every dependencies in order to have fast unit tests. On the other hand I am of the ...
mirind4's user avatar
  • 299
3 votes
0 answers
2k views

Testing a Django password reset procedure

I am writing tests for the password reset flow. It involves emails, links to reset the password etc so I made a really long test. It is testing quite a lot of things. If I break up the tests then the ...
user avatar
2 votes
1 answer
2k views

Test code for custom malloc

I've been working on a custom malloc where the test code is the following. ...
Niklas Rosencrantz's user avatar
7 votes
1 answer
8k views

Full integration test for a Console application

I'm sill experimenting with different design patterns for full integration tests for Console applications (and later also Windows Services) and I wasn't quite happy with the result of the refactoring ...
t3chb0t's user avatar
  • 44.3k
5 votes
1 answer
121 views

Breakable Toy: Go CLI for Gitlab

I started to learn programming in Go and came up with a Breakable Toy, which is a CLI for Gitlab. To get something up and running fast, I used some Go libraries: Ginkgo for testing Cobra for basic ...
Michael Lihs's user avatar
4 votes
0 answers
601 views

Deploy a Python script as an AWS Lambda micro web service

I'm still new to python, but my history is in the C/C++ world with plenty of Makefiles, though I've rarely written from scratch such elaborate ones as this. The Hitchhiker's Guide to Python gave me ...
feuGene's user avatar
  • 363
6 votes
1 answer
170 views

Support static typing / analysis with dependency injection

I am working on creating a test library, and I found DI to be pretty convenient, maybe even to create more functional coding patterns. Normally we can have an awkward before-hook setup in Node.js ...
Alexander Mills's user avatar
2 votes
1 answer
403 views

Testing an implementation of ports-and-adaptors for tkinter

I'm trying to test my implementation of ports-and-adaptors for tkinter. Assume I have a tkinter Entry declared like so: ...
Pablo's user avatar
  • 95
2 votes
0 answers
4k views

Simple API testing framework for testing of SOAP xml requests

I have a need to try to automate the testing of a large Web Service with an XML API interface. The framework takes the form of a Mavenised Java project. The usual maxims apply: must be highly ...
Steerpike's user avatar
  • 121
1 vote
2 answers
411 views

Function for getting strings consisting of random characters

I've made this function for to be used while testing. ...
michael.zech's user avatar
  • 4,516
2 votes
1 answer
15k views

Translating a makefile to cmake

My makefile looks like this and I translated it to cmake: ...
Niklas Rosencrantz's user avatar
4 votes
2 answers
106 views

Creating a device configuration

During the test process of a device, there is a procedure that sets a device in a state in which it is ready to be tested (typically by writing default measure parameters, 3G connection parameters and ...
Oscar Guillamon's user avatar
3 votes
1 answer
2k views

Testing a Rails API controller

I'm building a JSON API. I'm writing my controller tests so that they compare the response body to actual JSON I'm generating in my tests using ActiveRecord. I wrote two helper methods that make the ...
Mohamad's user avatar
  • 2,034
0 votes
1 answer
152 views

Basic sign-up method, testable and with try/catch [closed]

I am learning how to implement testing and try/catch statements into my code. I have a Laravel application with the following ...
Jon's user avatar
  • 109
3 votes
1 answer
2k views

Integration testing with in-memory databases strategy

I have an .mdf DB file and I want to use this DB for integration testing. In every test I should: Create a copy of an .mdf file. Attach DB to an .mdf copy file Do testing Detach DB copy Delete DB ...
Raskolnikov's user avatar
3 votes
2 answers
2k views

Rails integration testing: Should we use strings or named routes in http requests? [closed]

When integration testing Rails applications HTTP request helpers can take a string or a named route as the first argument. I find myself writing: ...
Mohamad's user avatar
  • 2,034
2 votes
1 answer
1k views

Integration test for database access

This integration test involves database access and hence opening and closing a database connection. Does it look correct? I am concerned about ensuring the the database connection is closed should the ...
52d6c6af's user avatar
  • 672
3 votes
1 answer
593 views

Sencha touch with XML

Could you please review the following? My concern is XML parsing is hardcoded: ...
Jackie Chan's user avatar
4 votes
1 answer
1k views

Ext JS: Avoid duplication

I have ext_scaffold (question.js). When I row click I get answers on this question, so ...
leeroygenehax's user avatar
13 votes
1 answer
2k views

ExtJS Grid Plugin

The code below is a plugin I wrote for Ext.grid.GridPanel, which basically allows you to have a bit more control over how rows are striped in the grid. By default ...
Mchl's user avatar
  • 528