Questions tagged [testcasesource]

46 questions
2
votes
2 answers

Is there any way to send arguments/values to Robot test cases from jenkins?

I have automated test which takes input from the user and runs the test. Any idea on if we can give the argument from jenkins for the robot testcase and run the test? ex: scenario: Test if a lighting device works well or not. steps: ssh login to…
2
votes
0 answers

NUnit TestCaseSource returns the same data for different yields

I have the issue with NUnit framework and TestCaseSourse. I have some test data: public TestData[] data = new TestDataBuilder() .Add("inputFile", "132JoinTest.xml") .AddRange("delimiter", ";", "") …
1
vote
1 answer

NUnit testcase generation: how to create sub-folders (hierarchy)?

I am generating NUnit testcases based on the file names. The directory looks like this: Customer CustomerTestCase1.xml CustomerTestCase2.xml Account AccountTestCase1.xml AccountTestCase2.xml I am using TestCaseSource: string[]…
Andrey
  • 580
  • 3
  • 8
  • 20
1
vote
1 answer

How to increase max_user_watchers in AWS code build? Error: ENOSPC: System limit for number of file watchers reached

getting this error while starting server to test cypress tests in AWS code build Error: ENOSPC: System limit for number of file watchers reached so i tried to increase max_user_watches to 524288. But then I was getting Running command echo…
1
vote
1 answer

How to use tuple with TestCasesSource in NUnit?

I've been writing some tests in C# using NUnit unitl I encountered an issue with test where I'd like to pass 2 times a 3 Item Tuples as an argument to the test. Seems like a similar problem as described here: How can I use tuples in nunit TestCases?…
1
vote
1 answer

Use NUnit Prefilter by nunit3-console

I'm developing data driven tests using Nunit3 and .Net Core 3.1 and I have many tests with more different data sources, which sometimes have complex logic inside. When I want start only one tests I want to start only one data provider, but I run…
1
vote
2 answers

Nunit: TestCaseSource does not expect to generate all test cases?

Hi everyone I have a problem with generate test cases for TestCaseSource. I wrote this code for tests: using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; namespace HeapSort.Tests { [TestFixture] …
Aiswe
  • 25
  • 6
1
vote
1 answer

NUnit: Can I use an empty TestCaseSource and still have a test pass?

I currently have some unit tests running against all of our controllers and actions, and an additional test for some "temporary exemptions" that we allow (but that receive other checks as a result). We were able to remove all of our temporary…
SeanKilleen
  • 8,809
  • 17
  • 80
  • 133
1
vote
1 answer

NUnit: How to run a test class on multiple objects - better alternative than TestCaseSourceAttribute?

I want to test all implementations of an interface with the same test class. I already know the TestCaseSourceAttribute, so I have set it up to load the object instances from the static testObjects array. This code works as I…
Xarbrough
  • 1,393
  • 13
  • 23
1
vote
1 answer

SpecFlow - How to use data driven tests like NUnits TestCaseSource property?

I'm a QA who decided to use SpecFlow for my test automation after some consideration. I think it's brilliant, but missing one feature which I did use often with other test runners such as NUnit - something similar to the TestCaseSource property from…
chrisc
  • 434
  • 3
  • 9
1
vote
2 answers

TestCaseSource in N-Unit

I'm writing some N-Unit tests and I'm having a little difficulty. I'm trying to wire up a Test to a TestCaseSource in my code, but it doesn't seem to be constructing the objects correctly. Here is my Test Method: [Test,…
elucid8
  • 1,412
  • 4
  • 19
  • 40
0
votes
0 answers

how do I write the test cases for the method with in the method?

How can I write the j unit test cases for the method within the method? please, help me out to resolve this issue. Here "CreatePreparedStatement" is the method within the create device history method . @Override @Transactional public DeviceHistory…
Praveen
  • 11
  • 4
0
votes
1 answer

Can anyone explain how to calculate the complexity of the following algorithm?

I have this algorithm and i have to find its complexity. I have in mind some things but until now the only complexity i found was the "worst" case which i assumed is the one that each time time all the elements go in one array and the other is…
0
votes
1 answer

Can NUnit run TestCaseSource based tests independently?

Below tests does not run independently which causes them to fail. In our case, we need to populate a database with relevant data for each case. Is there a way to let each run on a 'clean' fixture? [TestFixture] public class TestSourceTest { int…
Anders Juul
  • 2,407
  • 3
  • 34
  • 56
0
votes
0 answers

Go testcases for REST server

`Hi , I am new to Go and writing Testcases in Go . I have a REST server where all the data are retrieved from POST method. I am trying to write a test for methods but I am getting errors while testing. func (r *Rest) GetToken(c *gin.Context) { …