Questions tagged [testcasesource]

46 questions
0
votes
2 answers

C#: Parametrize an NUnit test with several number types

I want to test the simple + operator with several types of numbers: int, float, double ... To do this, I want to use Nunit TestCaseSource attribute. So far, the only way I found to do it is the following: public class TestAdditionExample { …
Milan
  • 1,547
  • 1
  • 24
  • 47
0
votes
0 answers

what are the difference between test cases and test scenarios in manual testing

What are the difference between test cases and test scenarios in manual testing? and also as a fresher I have to know about how to write test cases and test scenarios
0
votes
0 answers

Manual and automated test cases writing and storing

I'm going to implement bdd specflow project in a company, So the idea is like a manual tester will write test cases using bdd gherkin syntax, then the automation tester will understand it and automate. so my question is if anyone can recommend a…
0
votes
1 answer

Is there a similar tool as tcm / import for Azure Devops?

I remember using the tcm /import tool a couple of years ago, to automatically create a test case that is associated to the unit test in the specified dll. More details here:…
0
votes
1 answer

Array Manipulation on Hackerrank

What is the issue with my code? It only passes 6 of my testcases and I am sure I am making some mistake but I am not able to figure it out. Also if someone could help me understand the space and time complexity of this code I would be more than…
0
votes
1 answer

How to restrict test data method call for respective Test method by using TestCaseSource attribute in NUnit

I am using NUnit for the Selenium C# project. In which I have many test methods. For getting data (from excel) I am using a public static method that returns IEnumerable which I am calling at test method level as TestCaseSource. I am…
Jakkala
  • 1
  • 1
0
votes
1 answer

Execute Nunit Test case with multiple TestCaseSource attribute

My scenario is : Test script is requiring data from multiple excel files, so i want to have multiple testcasesource on Test method. Is there a way of having multiple testcasesource. For below Code my explanation: Iteration 1: It should fetch "TC01"…
0
votes
1 answer

Is there a way a test can have its TestCaseSource read data from outside source (like excel)?

I am writing new tests in Nunit. I would like the tests to get their TestCaseSource values from an excel sheet (Data-driven tests). However, I noticed that the [SetUp] method is actually accessed AFTER the [Test] method is entered, therefore I…
0
votes
1 answer

Nunit TestCaseSource skips some cases

I'm wokring on C# program, VS2015, R#, Nunit. I have Nunit tests [ Test ] [ TestCaseSource( typeof( GeneralTestCases ), "TestStoresCredentials" ) ] public void PingSoapAsync_IncorrectUrl_ThrowException( ServiceSoapCredentials credentials…
Maxim Kitsenko
  • 2,042
  • 1
  • 20
  • 43
0
votes
0 answers

NUnit 3.2 TestSourceCase TargetParameterCountException

I am trying to upgrade from NUnit 2 to NUnit 3. And I built a Data-Driven-Helper to read test case data from several type of data files. I found that NUnit 3.2's TestCaseSource that can pass parameters can help improve my Data-Driven-Helper,…
LN.EXE
  • 59
  • 8
0
votes
1 answer

incorrect output when using testcases else it's working fine(stacks used)

below i have uploaded a code to check if there parentheses in a string are balanced or not using stacks.It is working for 1 input,but for multiple testcases the correct output is not working.PLEASE HELP.THANKS IN ADVANCE. int main() { int t; …
cooltogo
  • 67
  • 12
0
votes
1 answer

Xamarin doesn't recognise TestCaseSource attribute

Xamarin doesn't recognise TestCaseSource, it says : The name TestCaseSource doesn't exist in the current context the way I use it : [Test, TestCaseSource("divider")] I cannot compile because of this.
Cher
  • 2,789
  • 10
  • 37
  • 64
0
votes
1 answer

Unit Testing simple login service using EasyMock

I am absolutely new to unit testing and have gone through tutorials about Mock object. I tried to test a simple login source code but unable to create the proper unit test code. Can somebody please provide some help if I wanted to test against…
0
votes
1 answer

Could not assign the dynamic value in testcasesource

I developed single test case using testcasesource. Already read data from excel and stored in array. Now I want to assign the array values for testcasesource dynamically.How can i do that? This is my code. [TestFixture] class testcases { static…
0
votes
1 answer

Already available Test cases for Android

Is there any open source test cases codes available for android junit. Like, test cases for android media player, content providers etc? I have searched through Google and cannot find related links. I'm testing using my test cases now but I want to…