Questions tagged [testcase]

A test case in software engineering is a set of conditions or variables under which a tester will determine whether an application or software system is working correctly or not.

A test case is also defined as a sequence of steps to test the correct behavior of a functionality/feature of an application. A test case is a set of conditions or variables under which a tester will determine if a requirement upon an application is partially or fully satisfied. It may take many test cases to determine that a requirement is fully satisfied. In order to fully test that all the requirements of an application are met, there must be at least one test case for each requirement unless a requirement has sub requirements. In that situation, each sub requirement must have at least one test case. Generally Senior tester writes test cases and after verification and approval the junior testers carry out execution of test cases.

998 questions
5
votes
1 answer

django test RequestFactory does not include request.user

Whenever I use the requestFactory during testing like: from django.contrib.auth.models import User from django.test import TestCase from django.test.client import RequestFactory from django.test.client import Client import nose.tools as nt class…
michel.iamit
  • 5,788
  • 9
  • 55
  • 74
5
votes
1 answer

jmockit mocked constructor not returning expected value

I am trying to unit test a class where one of its methods returns an instance of a collaborator class: depending on the values of its arguments it either returns a newly created instance, or a saved, previously created instance. I mock the…
Jim Renkel
  • 53
  • 1
  • 4
5
votes
1 answer

How to export testopia test-cases?

I'd like to export Testopia test cases in CSV or XML format but the builtin export doesn't allow to have the full test case with steps and results. I have to export for someone who will do tests without an Internet connection.
Andrea Giovacchini
  • 5,027
  • 3
  • 21
  • 23
4
votes
1 answer

Dynamic test cases

We are using NUnit to run our integration tests. One of tests should always do the same, but take different input parameters. Unfortunately, we cannot use [TestCase] attribute, because our test cases are stored in an external storage. We have…
Antipod
  • 1,593
  • 3
  • 23
  • 43
4
votes
1 answer

Controlling order of unit test methods in OCUnit

I have been using OCUnit for unit testing in a project. I've managed to do all the setup required for OCUnit in Xcode 4.2 & successfully build my test cases. How can I control the order (priority) for a test case? I see that test cases are built in…
Ritika
  • 593
  • 1
  • 8
  • 21
4
votes
2 answers

Django loading fixtures (not from installed apps) in tests

Is there a way to load fixtures that do NOT reside in appname/fixtures? According to django docs, fixtures have to be in directory of INSTALLED_APPS
Nam Ngo
  • 2,093
  • 1
  • 23
  • 30
4
votes
2 answers

Can't order test case in Requirement based Test Suite - Test manager 2010

In Test Manager 2010 It seems that I can't order test cases in a Requirement based Test Suite (ordering a test cases in normal test suite works fine) Please anyone explain me why they forbid me to do that, or suggest a way to work around Thanks a…
Nhím Hổ Báo
  • 572
  • 5
  • 20
4
votes
2 answers

How to reduce the time in executing Selenium test cases?

I'm writing the Selenium test cases for each screen to test the different scenarios. In our project for each build in Jenkins, its Selenium test cases (QA) also runs automatically. My problem is even though it's automated, it's taking a lot of time…
srini
  • 6,719
  • 8
  • 32
  • 36
4
votes
3 answers

In Python, If there is a duplicate, use the date column to choose the what duplicate to use

I have code that runs 16 test cases against a CSV, checking for anomalies from poor data entry. A new column, 'Test case failed,' is created. A number corresponding to which test it failed is added to this column when a row fails a test. These…
feelsgood
  • 135
  • 14
4
votes
0 answers

Gitlab pipeline is not failing when Jest test case fail or throw error

I am using Jest for testing mu nodejs code an after commiting my code the pipeline runs and Jest test case is throwing error but pipeline is not failing. In test case it shows there are not expected results and so test case is failing but is not…
jazeb007
  • 578
  • 1
  • 5
  • 11
4
votes
2 answers

How to get the status of test(i.e. pass or fail or error) in Postman?

Here is my test case in postman pm.test("verify the JSON object keys for machines - ", function() { if (Object.keys(data).length === 0) { pm.expect(Object.keys(data).length).to.eq(0); } } Now if status of this test is PASS then I…
Dev
  • 2,739
  • 2
  • 21
  • 34
4
votes
5 answers

How to import test cases from Excel to VSTS/Azure DevOps

I have a lot of test cases which are currently in Excel that I need to migrate those to VSTS/Azure DevOps. Can someone recommend me a good way to do that.
skv
  • 149
  • 2
  • 3
  • 15
4
votes
0 answers

NUnit error: the test case source could not be found

This is quite simple but annoying behavior I am running into with NUnit: I have one test like this: static string[] EvenStr = new string[] { "1", "2", "3", "4" }; [Test, TestCaseSource("EvenStr")] public void TestMethod(string num) { …
yousef
  • 41
  • 1
  • 2
  • 5
4
votes
1 answer

How to generate unit test cases in VS 2017 .net core project?

"Create Unit Tests" context menu option is missing in Visual Studio 2017 for .Net core project? I read some articles saying that "Create Unit Tests" context menu option is removed in VS2017/Core/x64 config. But those were old articles. So, wanted to…
4
votes
1 answer

The sourceName specified on a ValueSourceAttribute must refer to a non null static field, property or method

I am trying to use ValueSourceAttribute for my tests. Here is an example [Test] public async Task TestDocumentsDifferentFormats( [ValueSource(nameof(Formats))] string format, [ValueSource(nameof(Documents))]…
user4671628