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
8
votes
2 answers

Add Token to headers request in TEST mode DRF

how is possible to add 'Authorization': 'Token' to TEST request in Django/DRF? If i use simple requests.get(url, headers={'Authorization': 'Token'} all work perfect but how to do such request in TestCase?
Beliaf
  • 577
  • 2
  • 8
  • 25
8
votes
7 answers

How can I best write unit test cases for a Parser?

I am writing a parser which generates the 32 bit opcode for each command. For example, for the following statement: set lcl_var = 2 my parser generates the following opcodes: // load immdshort 2 (loads the value 2) 0x10000010 // strlocal lclvar…
Vinay
  • 4,743
  • 7
  • 33
  • 43
8
votes
1 answer

Nunit: Add Category to specific test cases

I would like to run a small set of NUnit test cases as a pre-checkin sanity check, and a more comprehensive set of test cases on my on-checkin and nightly test runs. So I had hoped I could decorate certain tests cases with the "Category" attribute,…
Alan Potter
  • 83
  • 1
  • 4
8
votes
4 answers

Spring JUnit test case failed

I try to run a JUnit test case for ProductDAO class, that is part of the spring web application. But it still fails. I am not sure by my test-context.xml file. I have ProductDAOImplTest class in path src/test/java and mentioned ProductController…
misco
  • 1,912
  • 4
  • 41
  • 68
7
votes
2 answers

How to read parameter values from a TestCase in Microsoft Test Manager

I am trying to execute the testcases programatically using the microsoft test manager using c#. For that I want to read the parameter values stored in Microsoft Test Manager. Please suggest me how to do that Eg:- Read the value of internal paramter…
HarshJain
  • 327
  • 1
  • 4
  • 12
7
votes
2 answers

How to add test case grouping in Cypress

I am currently working on UI Integration tests using Cypress. I am looking for ways to add test case grouping in cypress similar to the standard TestNG. I was not able to find any grouping features in cypress documentation. I did find this post:…
sgv393
  • 133
  • 2
  • 9
7
votes
4 answers

Laravel PHPUnit returning 404

For laravel API I have write the test cases. But whenever I am running the test cases it always failed with below error, 1) Tests\Feature\CompanyTest::orgTest Expected status code 200 but received 404. Failed asserting that 200 is identical to…
Narayan
  • 1,670
  • 1
  • 19
  • 37
7
votes
2 answers

Eclipse Java IDE JUnit5: junit.jupiter.api.Assertions is not accessible

I'm new to the whole programming stuff but here's my problem: I used to add my JUnit test cases in Eclipse by right clicking on the project, and just add New > JUnit Test Case. Currently, I am not able to implement any test methods because Eclipse…
jmuffin
  • 81
  • 1
  • 1
  • 6
7
votes
2 answers

How to write test cases for beego app?

How to approach writing test cases for Beego app. As i can see on Beego website, they have model test case but what about controllers? Any Framework which can help?
Sandeep Singh
  • 71
  • 1
  • 3
7
votes
2 answers

Java Junit testing problem

I am using Junit 4. My whole program is working fine. I am trying to write a test case. But there is one error... here is very basic sample test public class di extends TestCase{ private static Records testRec; public void testAbc() { …
user238384
  • 2,396
  • 10
  • 35
  • 36
7
votes
1 answer

Django test database not auto-flushing

I have a bunch of unit test files, all of which consist of django.test.TestCase classes. Wrote myself a little shell script to uncomment/comment test file imports in my __init__.py file, so I can run tests from certain test files, based off the…
pleasedesktop
  • 1,395
  • 3
  • 14
  • 25
6
votes
3 answers

Bad url test cases

I'm working on a function to validate http urls. I need some good and bad urls to do unit testing. Please share me your test cases. Thanks.
Bruce Li
  • 505
  • 4
  • 12
  • 27
6
votes
1 answer

Avoid updation of cloned testcase when master copy is updated in VSTS

I have a Master Copy of test cases, which I will be cloning for every testing cycle. Changes in Master Copy test cases gets reflected in already cloned test cases. How can i avoid this?
Sagar Patil
  • 1,400
  • 15
  • 29
6
votes
2 answers

TypeError: assertEqual() missing 1 required positional argument: 'second'

I am working on a project in Runestone using test.testEqual(). I work with a Anaconda/Spyder console and translate code back into Runestone. Python doesn't seem to support test.testEqual so I have attempted to use…
chaza68
  • 113
  • 2
  • 8
6
votes
2 answers

Test case data for convex-hull

I need to make a 2D convex hull function for a class assignment and I want a more robust test cases than the assignment provides. Does anyone known of a largish test cases (25 < n < 100) with the solution?
BCS
  • 75,627
  • 68
  • 187
  • 294