Questions tagged [parameterization]

157 questions
3
votes
1 answer

pytest test needs parametrization at collection phase and at setup time

I have some tests which I'd like to parametrize using some arguments which need the parametrization to happen during collection phase and some which need it to happen at setup time. I'm unable to use metafunc.parametrize in a pytest_generate_test…
elin
  • 31
  • 2
3
votes
1 answer

More concise way of adding parameters to vendor independent IDataParameterCollection?

On every ADO.NET connector we have AddWithValue and hence adding parameters was a breeze. I am surprised that that overload is not available on IDataParameterCollection or even on DbParameterCollection. How can I achieve the same with minimal fuss…
nawfal
  • 70,104
  • 56
  • 326
  • 368
2
votes
1 answer

Rule for Cast operator validity when Interface held type is converted to a final class Type according to JLS

Consider the following clause of JLS 8 §5.5.1 Blockquote If S is an interface type: ... If T is a class type that is final, then: ... – Otherwise, S is either a parameterized type that is an invocation of some generic type declaration G, or a raw…
theutonium.18
  • 483
  • 2
  • 7
2
votes
1 answer

Java Generic of Generic method

I wonder if it is possible to write a method that will handle casting of undefined types like: Precondition: Map map = new HashMap<>(); List l = List.of("value"); map.put("key", l); Method call: List strings =…
2
votes
1 answer

SQL Server 2019 infinitely recompiles inline table valued function that does full text search with Parameterization = Forced

I have hit a problem with SQL Server that results in it infinitely recompiling a function. To reproduce, create a new database with the option Parameterization = Forced or execute the following on an existing DB: ALTER DATABASE [DatabaseName] SET…
2
votes
1 answer

How to use a variable from setup fixture outside fixture

I want to use the product variable present inside setupone fixture outside it. I want to use it in test_title.py in skipif marker for conditional skipping (run the test case if product name satisfies). conftest.py def pytest_addoption(parser): …
2
votes
1 answer

Maven param that contains spaces in jenkins declarative pipeline

Let's say that we have a jenkins pipeline that at some point we execute a maven parameterized build: sh "mvn clean install -DparameterType=${parameter}" What if the parameter's value contained spaces? Eg the value was "test param". When running on…
2
votes
0 answers

How to find the optimized parameters in an ODE in python?

I am trying to obtain the optimized values of 5 parameters in a differential equation with Python. The equation is: dl/dt = k1 * exp(((alpha * n * F) / (R * T)) * (V - (E * l) - phi)) - k3 The 5 parameters to obtain are: k1, alpha, E, phi, k3 The…
2
votes
1 answer

JMeter :: Parameterization Query for mapping test data with user ID

The issue is with JMeter parameterization Logic. I have a csv file with user id and pwd - which is fine Another CSV has 10 records, one for each user ID. How do I map these records to user ids? Csv1: UserID, Pwd TestUser1, Password1 TestUser2,…
swetha
  • 85
  • 4
2
votes
1 answer

Randomly selecting object from a web page in TruClient- HPE Loadrunner

I am working Loadrunner 12.55, and Using TrueClient Protocol to design script for my application. I have been blocked in an issue, where for each iteration the script should click on random object in the list . Not able to achieve this through…
2
votes
4 answers

Parameterizing a kdb q script

I'm writing a kdb/q script which will somehow have to prompt for user input and then add that input into several otherwise-preformatted queries. Suggestions on how to prompt/accept the input and parameterize the queries?
2
votes
1 answer

How to pass a variable into JQ select/contains query

I am trying to pass two variables into a jq query. My JSON { "AlbumTitle": "Name Of Album", "AlbumLink": "/album/link/id/1/album-name/", "ArtistName": "Artist Name", "Date": "September 14, 2018" }, { "AlbumTitle": "Name Of Album", …
Sukh
  • 85
  • 2
  • 9
2
votes
2 answers

meta multiple operator overloading

The question is if I can find a way to make a parametrized overloading of an operator i.e. instead of template class A { private: T m_var; public: operator T () const { return m_var; } const A operator+ ( const…
2
votes
1 answer

Is it possible to create an instance of parameterized class in Java?

I have the same logic in classes creation, but actual classes are different. Is it possible somehow to create an instance of a parameterized class? Here is an example: public class MyClass { public List myList = new…
Oleksandr
  • 3,574
  • 8
  • 41
  • 78
2
votes
0 answers

Mockito - spy of parameterized class calls mock method

I have been scratching my head a lot over something which just happened with Mockito. I have this class, called ExamineFilter, which up to now has not been parameterised. 150+ tests to do with this class and others all passing fine. Lots of…
mike rodent
  • 14,126
  • 11
  • 103
  • 157
1
2
3
10 11