Skip to main content
Filter by
Sorted by
Tagged with
2 votes
0 answers
39 views

I have the following integration test which is setting up the database with @DatabaseSetup and checking that after doStuffThatAffectsTheDb() executes, the db has been modified as expected with @...
elcye's user avatar
  • 413
0 votes
1 answer
89 views

Say, I have an abstract class for testing. abstract class BaseEntity<SELF extends BaseEntity<SELF>> { } I declared an abstract test class for testing subclasses of the BaseEntity. ...
Jin Kwon's user avatar
  • 22.4k
1 vote
0 answers
261 views

I get an errors when trying to work with INSTANTIATE_TEST_SUITE_P. The minimum non-working example that I got is: #include "pch.h" class SimpleTest : public ::testing::TestWithParam<int&...
Xaoc's user avatar
  • 11
0 votes
1 answer
203 views

I want to repeatedly execute the following test class: class Test { static Foo foo; @BeforeAll static void setUpAll() { foo = generateRandomFoo(); } @ParameterizedTest ...
Борат Сагдиев's user avatar
1 vote
1 answer
68 views

I have the below block of code. import pytest @pytest.mark.parametrize("project_name", [ pytest.param("default", marks=pytest.mark.defa), pytest.param("remote", ...
Joshi's user avatar
  • 641
0 votes
1 answer
36 views

I have a parameterized test with the following property names passed to it: [TestCase("customerId")] [TestCase("connectionType")] public void CanSearchClientsOrderedByProperties(...
YMM's user avatar
  • 722
5 votes
3 answers
3k views

The Playwright documentation has a parameterize sample like this. It works: const people = ['Alice', 'Bob']; for (const name of people) { test(`testing with ${name}`, async () => { // ... })...
QQ321's user avatar
  • 83
0 votes
1 answer
387 views

I have a bunch of junit 5 Tests, some of which are Parameterized, and I want to call them from a java class. The test runs successfully through IDE or using gradle clean build when kept in src/test ...
Shubham Anand's user avatar
0 votes
1 answer
2k views

can i get help with this ? this my the json file : { "1": "1", "2": "2", "3": "Fizz", "4": "4", "5": ...
Moon_Sigma's user avatar
0 votes
0 answers
63 views

How would I streamline the following testing scenario in Go? Say I have some interface I with a corresponding implementation A and most of my tests for A basically look like: func TestSomething(t *...
raisyn's user avatar
  • 4,594
1 vote
1 answer
54 views

I have a pytest function that has markers @pytest.mark.win_11 and @pytest.mark.parametrize('os,result',[('win_11','result1'),('win_8','result2')]) When I run test as 'pytest -m win_11', it is running ...
explorer2020's user avatar
1 vote
1 answer
293 views

I'm trying to write a parameterized test based on some string values using the Criterion framework. As an MRE, and following the example shown in the docs, I wrote the following: #include <...
Mehdi Charife's user avatar
0 votes
1 answer
58 views

I try to run some tests on all classes that extends the same baseclass like: classe Baseclass { abstract int method(); } class A extends Baseclass { int method(){...} } class B extends Baseclass {...
daskai0815's user avatar
0 votes
2 answers
193 views

I have multiple parameterized Jenkins jobs to run multiple tests. I need to update one parameter of all the Jenkins jobs. Instead of changing the parameters one by one, is there a way to edit all the ...
Nishant Chandra's user avatar
0 votes
0 answers
20 views

So I have created a parameterized test, which is a simple restassured test which logs into a user account. I have some spring bean config in place, which you can specify a profile to pick up a ...
Chi's user avatar
  • 1
0 votes
1 answer
1k views

I have created below JUnit5 parameterized test with ArgumentsSource for loading arguments for the test: public class DemoModelValidationTest { public ParamsProvider paramsProvider; public ...
Priom Biswas's user avatar
0 votes
1 answer
85 views

i am currently working on a Project with Tests in JUnit 4 and i should migrate them to JUnit 5. Now i have the Problem that i have a Parameterized test in JUnit 4. Lets say my test looks like this: @...
javaTopics's user avatar
1 vote
1 answer
3k views

I am posting a simple code below, why does @BeforeAll annotated method and static block run after the Parameterized tests? How do I register a common object or Database connection in this case before ...
XAJA's user avatar
  • 37
2 votes
1 answer
2k views

I have 2 pyTest test cases that take a parameter. I want to run them in order with both params, instead of the first test running with all possible values, and then the 2nd test starting. Consider the ...
Anchit Arnav's user avatar
0 votes
1 answer
339 views

I have a problem with my parameterized tests. @ParameterizedTest @ArgumentsSource(CorrectMessagesArgumentProvider.class) void shouldSendMessageForCorrectConfiguration(SmtpConfiguration ...
bkomo's user avatar
  • 85
8 votes
3 answers
2k views

I am working on an aggregation framework using spring boot, which can be used to aggregate multiple kinds of I/O operations' results. Additionally, it has support for both non-blocking (reactive) &...
aksh1618's user avatar
  • 2,599
1 vote
1 answer
3k views

I want to achieve something like this: my conftest.py will contain: fixture_1 - will do some manipulation with input such as a, b, c using request.param fixture_2 - will do some manipulation with ...
Shiva Kumar's user avatar
0 votes
1 answer
2k views

I am currently writing unit tests related to GET requests, here below is a parameterized test that take a generic type E. abstract class AbstractEntityTest< E extends Entity > { @...
E-M-C's user avatar
  • 21
0 votes
1 answer
3k views

I am trying to migrate from JUnit4 to JUnit5 and also I'm new to ParametrizedTest in Junit5 and I have a scenario wherein I would like to provide different DisplayName and the Test argument(Object). ...
flowAlong's user avatar
  • 139
2 votes
1 answer
1k views

I may use case the class under test has many cases so it is divided into a structure of inner classes. I want to write parameterized test cases to reduce boiler plate and code duplication. For this I ...
Varun Yadav's user avatar
23 votes
1 answer
18k views

For example, I have few enums in my project: Figure, with values TRIANGLE and SQUARE Color, with values are RED and YELLOW How to create a test, using the cartesian product of all of the ...
Victor Levin's user avatar
1 vote
1 answer
4k views

Eclipse Version - 4.19.0 Maven Version - 3.8.1 In JUnit I am trying to implement @ParameterizedTest using @CsvSource or @MethodSource. Both are failing due to org.junit.jupiter.api.extension....
Jay's user avatar
  • 401
1 vote
1 answer
2k views

I'm trying to translate a ParameterizedTest from JUnit4 to JUnit5 (sadly I'm not particularly skilled in testing). In JUnit4 I have the following class: @RunWith(Parameterized.class) public class ...
Akinn's user avatar
  • 2,128
1 vote
1 answer
780 views

I'm using pytest to run tests, each with a unique account ID. Each test function requires some setup and teardown, and I switched to using fixtures according to previous suggestions. But now I need to ...
Eugene Huang's user avatar
0 votes
0 answers
457 views

I am using gtest for my tests and i am discovering value-parameterized tests. I understand the google example with int tab[] = {1, 2, 3}; INSTANTIATE_TEST_CASE_P(MyTestName, MyTest, ::...
YopAndMail's user avatar
1 vote
0 answers
535 views

Inorder to get multiple values for test case from JSON file, added the annotation @jsonfilesource and passed JSONObject as parameter to the method in Mockito framework. But I am getting below ...
priya's user avatar
  • 21
2 votes
2 answers
2k views

When writing android espresso UI test, is it possible to write parameterized test which accepts data from two different json files to add list of items inside the app? I have seen parameterized tests ...
chang93's user avatar
  • 25
0 votes
1 answer
1k views

I have a parameterized JUnit 5 test, e.g. @EnumSource(Mode.class) @ParameterizedTest void shouldRunWithMode(Mode mode) { ... I want to exclude one of the enum cases from running in Maven, as ...
rü-'s user avatar
  • 2,342
7 votes
2 answers
26k views

I have a problem, I would like to pass the test method to send a request using the GET method and POST. I used parameterization, but I get information java.lang.Exception: Method simpleMessage should ...
Charles's user avatar
  • 199
0 votes
1 answer
348 views

I am using JUnit 5 and I have a test case like this: @ParameterizedTest @ValueSource(Strings = {a , b , c}) void example(String letter){ // do something } the c case is unhandled for now, so is it ...
Insurgent's user avatar
4 votes
2 answers
3k views

I am using Kotlintest and data tables to test an application that uses Kotlin, SpringBoot and Gradle because the syntax is way more concise than ParameterizedJunitTests when you have complex data in ...
peach's user avatar
  • 767
1 vote
2 answers
1k views

I'm using NUnit 3 TestCaseData objects to feed test data to tests and Fluent Assertions library to check exceptions thrown. Typically my TestCaseData object contains two parameters param1 and param2 ...
YMM's user avatar
  • 722
4 votes
1 answer
2k views

I have a gtest test fixture for variable parameterized tests and I instantiate the test suite as below: INSTANTIATE_TEST_SUITE_P(Instantiation, Fixture, ::testing::Range(1, 100)); When I execute the ...
locke14's user avatar
  • 1,423
5 votes
1 answer
6k views

I have a base test class for my tests which does the initialisation work before each test. Here is the code public class BaseTestParameters { MyObj myObj; @DataProvider(name = "apiType") ...
lostintranslation's user avatar
2 votes
1 answer
2k views

How can I implement Gherkin data tables in Robot Framework? The following snippet should pass two sets of (n, is_prime) parameters to Keywords in order to verify that: is_prime(5) = True is_prime(6)...
taggore's user avatar
  • 33
0 votes
1 answer
2k views

I have written a code as follow: but while compiling it throws the compilation error saying "The attribute 'name' is undefined for the annotation type Parameterized.Parameters" @RunWith(...
C.k.'s user avatar
  • 125
0 votes
1 answer
593 views

Here's the simple problem I'm struggling with. In the first example, no tests are run; whereas in the second one, two tests are run as expected. Does not work as expected: // testData gets populated ...
Akshay Maldhure's user avatar
3 votes
2 answers
8k views

SO I am trying to use ParameterizedTest from JUnit5 and setup the pom to load everything and now have the following test class. import static org.hamcrest.MatcherAssert.assertThat; import static ...
Patrick Aquilone's user avatar
7 votes
1 answer
1k views

For the following Kotlin class: class ProductLogic( private val product: Product? ) { fun shouldShow(): Boolean { if (product == null) { return false } ...
JJD's user avatar
  • 52.7k
2 votes
1 answer
315 views

While debugging a Parameterized test, I realized the test wouldn't run if the parameters were passed as a List of Lists (List<List<Any>>), yet worked fine with a List of Arrays (List<...
Shalbert's user avatar
  • 1,174
1 vote
1 answer
1k views

I have two ArrayList<> Objects of equal lengths, and my Junit5 parameterized test has the syntax: @ParamterizedTest @MethodSource("dummyfunction"); void functionName(String s1, String s2) { ..... ....
Dhrubojit's user avatar
2 votes
1 answer
1k views

Given a simple test-method, annotated as @ParameterizedTest, employing input via Annotation @CsvSource (e.g.@CsvSource({ "@", "*", "#", "?", "-", "$", "!", "0" }). When running said test, the test ...
Navid Noor's user avatar
3 votes
2 answers
1k views

I found a lot of introductions to parameterized tests/ test cases for test cafe, but the syntax is completely different to the one I am using. I guess they're for the discontinued paid version. How ...
Medusa's user avatar
  • 633
0 votes
1 answer
945 views

I'm trying to use pytest to take in an id for a suite to run, load the suite from a db, and then generate the test cases in a parameterized fashion. The code below shows the gist of what I want to do, ...
Sevenless's user avatar
  • 2,855
3 votes
1 answer
5k views

Let's say I have a Simulation object whose core attribute is a dictionary of parameters that takes something like the following form: @pytest.fixture def param_base(): '''Dict of parameter ...
user3088305's user avatar