testing Questions

3

Solved

I have added tox to my project and my tox.ini is very simple: [tox] envlist = py37 [testenv] deps = -r{toxinidir}/requirements_test.txt commands = pytest -v But when I run tox, I get the fo...
Dorothadorothea asked 22/8, 2019 at 14:29

4

Solved

I understand that this question has been asked 1000 times but every answer I can find on Stackoverflow and other websites are all the same: Either (1) The user is using Genymotion, (2) the user is ...
Lace asked 24/8, 2016 at 18:23

4

I want to integrate PyTest with Visual Studio so my tests show up in the Test Explorer. So far I have not found any way to do this while some old posts here suggest that people have done it before....
Aguilar asked 17/2, 2018 at 3:18

2

When I ran this code in VS Code, it gives msg that "no testcase ran in 0.2s". So, How can I ran testcases in VS Code. import pytest from selenium import webdriver from time import sleep f...

1

I'm using junit 4.12 and would like to ignore all test cases in class at once instead of adding ignore annotation before each method marked as test. According to documentation it is possible to add...
Upspring asked 12/12, 2018 at 9:51

9

Solved

I'm running a test in Go with a statement to print something (i.e. for debugging of tests) but it's not printing anything. func TestPrintSomething(t *testing.T) { fmt.Println("Say hi") } When I...
Geryon asked 21/4, 2014 at 20:27

2

While doing testing with Jest I am getting a warning saying "A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper te...
Shawntashawwal asked 8/4, 2021 at 4:18

3

I would like to set (actually mock) a timezone in my Vitest tests to get deterministic results in all time zones they will run in. I run my tests on a local machine and also in CI/CD environments t...
Prosecutor asked 16/8, 2023 at 8:43

5

The steps I want to take are: Start the Cypress test-suite and use cy.setCookie to set the JSESSIONID cookie (already acquired and up-to-date) After the cookie is set, then use cy.visit to access ...
Portal asked 19/3, 2021 at 23:17

11

Solved

What's the best way to correctly mock the following example? The problem is that after import time, foo keeps the reference to the original unmocked bar. module.js: export function bar () { return...
Selassie asked 14/7, 2017 at 20:33

6

I am transitioning from junit4 to junit5 on a project and trying to figure out how to test logs. Previously, I used @Rule OutputCapture outputCapture = new OutputCapture(); and would then write ...
Emelina asked 13/3, 2017 at 14:24

3

Solved

I was asked to create integration tests for an existing SpringBoot project, whose organisation is not as modular as I would prefer. For example, there is a package yielding all repositories associa...
Wriggler asked 17/2, 2020 at 10:16

6

Solved

I have a Laravel 4 test class with some tests for which I want to seed my database before running the tests. Using the setup() function to reseed for each test takes far too long. However, when I t...
Cherellecheremis asked 19/2, 2014 at 22:14

2

Solved

Error I'm getting Anytime I run npm test: FAIL ./App.test.js ● Test suite failed to run Jest encountered an unexpected token This usually means that you are trying to import a file which Jest ca...

8

Solved

I have an app that connects to a MYSQL database through the entity framework. It works 100% perfectly, but I would like to add a small piece of code that will test the connection to the database up...
Active asked 6/10, 2013 at 16:24

16

Solved

Has anyone succeeded in generating code coverage for Go unit tests? I can't find a tool for that on the web.
Packing asked 9/5, 2012 at 12:59

7

Solved

Are there any code coverage tools for manual testing? For example, if I write 30 new lines of code, compile, then run, is there any way to quickly verify that all 30 lines were run? Also, later, ...
Mammal asked 7/4, 2009 at 1:18

3

Solved

I have found many posts on how to continue a gradle build when a unit test fails, however I cannot find any posts for how to stop for fail a build if a test fails. Is it possible to stop a debug bu...
Patron asked 22/1, 2017 at 0:25

3

Solved

I'm using VCR gem to record http interactions and replay them in future. I want to filter-out my actual password value in the uri request. Here's sample of what the uri looks like: http://services...
Chansoo asked 22/3, 2012 at 3:43

6

Solved

I'm using python pytest to run my unit tests. My project folders are: Main - contains data file: A.txt Main\Tests - the folder from which I run pytest Main\Tests\A_test - folder that contains a tes...
Ubiquitous asked 26/11, 2017 at 16:30

9

Solved

Suddenly today all my tests stopped working, giving me following error message: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver on...
Wheatworm asked 4/3, 2022 at 10:45

4

I'm writing tests for airflow dag and running into issue mocking/patching the dag. # dag.py from airflow.models import Variable ENVIRONMENT = Variable.get("environment") # test_dag.py import da...
Accelerometer asked 10/6, 2020 at 23:27

5

Solved

Say I have the following code: try: print 'foo' # A lot more code... print 'bar' except: pass How would I for testing purposes disable the try-statement temporary? You can't just comment t...
Mitchelmitchell asked 5/12, 2012 at 23:42

9

I have a Java web app with spring boot When run test I need to exclude some Java config files: Test config (need to include when test run): @TestConfiguration @PropertySource("classpath:otp-test...
Ministry asked 27/9, 2016 at 16:23

1

What would be the most idiomatic way to write tests for a CLI program using clap? I'm currently doing it like this: #[derive(Debug, Parser)] #[clap(author, version, about)] pub struct StructArgs { ...
Presidency asked 31/5, 2022 at 16:40

© 2022 - 2024 — McMap. All rights reserved.