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
4
votes
1 answer

XUnit MemberData with List objects

I am writing a xunit test to test the functionality of a utility method that splits a sentence based on spaces. Ex: Input: "Who goes there?", Output: {"Who", "goes", "there"} a collection/list of strings. I have attempted the following [Theory] …
sanchin
  • 117
  • 1
  • 11
4
votes
1 answer

Django Test mocked ImageField prevent upload or clean after tests

I am working on a TestCase for my project, involving some Image and FileFields. Some objects are loaded with fixtures, some objects are created during the tests. I Mocked my image with a InMemoryUploadedFile. When creating a new test object, the…
Nrzonline
  • 1,600
  • 2
  • 18
  • 37
4
votes
3 answers

Testcases for NUnit 3 tests in F#

I am trying to set up a test suite for an F# project using NUnit. It seems that especially when testing things like parsers and type checkers one typically has a list of valid input data and a list of invalid data. The tests itself are practically…
Friedrich Gretz
  • 535
  • 4
  • 14
4
votes
3 answers

How to skip test case in Robot framework using keyword

i'm trying to skip a specific test case using keyword, is there are any keyword to do that ? what i'm trying to do is to check if file name have "skip" word then i want to skip it. is there are any keyword like : Skip Test , Skip Execution If…
Roni
  • 604
  • 2
  • 6
  • 12
4
votes
2 answers

How to add a result tolerance to a NUnit TestCase

I have an algorithm that converts a value between celsius and farhrenheit. To test that it works with a wide range of values I'm using NUnit's TestCases like so: [TestCase( 0, Result = -17.778 )] [TestCase( 50, Result = 10 )] public double…
Fabi1816
  • 389
  • 1
  • 4
  • 16
4
votes
4 answers

Common @before and @after for test classes in junit

Is it possible to have a common @Before and @After fixtures that can be used across multiple test classes? I have segregated the tests (into classes) based on modules (Inventory, Sales, Purchase etc.). For all these tests, user Login is a…
Krishna Sarma
  • 1,852
  • 2
  • 29
  • 52
4
votes
2 answers

run code when unit test assert fails

I'm using assertEquals() from unittest.TestCase. What I want to do now is to call a function and do something there when the assertion fails, I wonder if there's a way of doing this?
J Freebird
  • 3,664
  • 7
  • 46
  • 81
4
votes
3 answers

How to unittest Session timeout in Django

I have a requirement something like this: As soon as the user signsup(and will be in the waiting state untill he confirms his email address), a session variable is set something like "FIRST_TIME_FREE_SESSION_EXPIRY_AGE_KEY"(sorry if the name sounds…
Nanda Kishore
  • 2,789
  • 5
  • 38
  • 61
4
votes
1 answer

How to add Tags to a TestCase in Rally using Rally's JAVA API?

I have been struggling with adding a tag to a testcase in Rally. The tag is already present in the Tags collection. But I cannot add it to a testcase. Can some provide an example about how to do this? Thanks a lot.
hariszhr
  • 409
  • 2
  • 14
4
votes
1 answer

Junit test not reverting data

I have make some testcases in junit and after testing the methods it is not reverting data from database. For this I have inserted some data to database. and then I tested the method.so after finishing the test data must be deleted , but it is not…
abhishek ameta
  • 2,326
  • 7
  • 28
  • 35
3
votes
5 answers

Test cases for each link in a Website?

I have a pretty basic question about test cases in the world of Website development. Does it make sense to have a separate test case for each hyperlink for all pages in a site? For e.g. my site might have 10 pages, each with approx. 10 hyperlinks in…
theraneman
  • 1,620
  • 4
  • 18
  • 32
3
votes
1 answer

Cypress test running locally but skipping tests on github actions

I am using github actions to run my test cases it is working fine for 2-3 months but now it is skipping test on github actions. Tried adding wait but still nothing change. Can anyone Guide? screenshot I increase timeout but still skipping tests on…
3
votes
0 answers

Electron - Need unit testing framework for bundled app

we are using electron framework to create WINDOWS and MAC installer. For frontend, we are using Angular to show data. We are also using sqlite3 database to store data locally in user's system using node.js. Everything working fine like api calling…
3
votes
1 answer

Why user autometically authenticated in django test case?

from django.urls import reverse from rest_framework.test import APITestCase from rest_framework.authtoken.models import Token from faker import Faker fake = Faker() APICLIENT = APIClient() from factory_djoy import UserFactory class…
3
votes
0 answers

Cannot invoke "org.apache.commons.logging.Log.isDebugEnabled()" because "this.logger" is null

Here the code that I used to save data and I use @Transactional. I want to write a test for this method, but it fails. @Transactional(rollbackFor = BadRequestException.class, propagation = Propagation.REQUIRES_NEW) public void…
Ruwandi
  • 41
  • 3