Questions tagged [testing]

Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results.

For better answers, any questions about Software Quality Assurance & Testing should be asked on SQA - https://sqa.stackexchange.com/. You can ask only programming related questions on Stack Overflow and that too can be asked on SQA

From Wikipedia:

Software testing is an investigation conducted to provide developers and stakeholders with information about the quality of the product or service under test. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation.

Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs (errors or other defects).

Software testing can be stated as the process of validating and verifying that a software program/application/product:

  1. meets the requirements that guided its design and development;
  2. works as expected;
  3. can be implemented with the same characteristics.

There are white-box-tests and black-box-tests.

A white-box test verifies the structure of a software product whereas the block-box test validates the requirements.

Software testing, depending on the testing method employed, can be implemented at any time in the development process. However, most of the test effort occurs after the requirements have been defined and the coding process has been completed. As such, the methodology of the test is governed by the software development methodology adopted.

The following types of tests are commonly used to denote the level of detail the tests are focused on:

Agile and Test Driven Development

Agile development model places added emphasis on testing. Test driven development advocates writing a test for a feature before developing the actual feature. Additional information:

Shift-left testing

Shift-left testing is an approach to software testing and system testing in which testing is performed earlier in the lifecycle (i.e. moved left on the project timeline).

49776 questions
16
votes
4 answers

The following error originated from your application code, not from Cypress

i tried to test this simple code type Url = string it('loads examples', () => { const url: Url = 'https://www.ebay.com/' cy.visit(url) cy.get('input[type="text"]').type('book') cy.get('#gh-btn').click(); …
leen M
  • 477
  • 1
  • 5
  • 14
16
votes
3 answers

lateinit property mock object has not been initialized

I'm trying to initialize (by mocking) two objects with the annotation @MockBean It seems only to work if i call the method mock(className), but since i want to use the mocked class on multiple methods i don't want to keep repeating the same code in…
J. Adam
  • 1,457
  • 3
  • 20
  • 38
16
votes
2 answers

Run all UI/Unit tests from a multi-module project using a single command

We have a multi-module Android project, in which some modules contain UI tests and some contain Unit tests. We wish to run all UI tests from all modules using a single Gradle command and do the same thing for Unit tests. The only way that we found…
Bogdan Zurac
  • 6,348
  • 11
  • 48
  • 96
16
votes
1 answer

Get tests running time with Jest

Is there any way to know how long my tests take without doing it programmatically with Jest? To be clear, I know that if I add a variable to get the current time before each test and then log this when my test completes I'll get this information,…
R. Karlus
  • 2,094
  • 3
  • 24
  • 48
16
votes
2 answers

Testing oAuth / facebook authentication with WebTestCase in Symfony2

I'm trying to get a FacebookLoginTest running. Problem is: the Symfony2 client does not send real HTTP requests, so it does not work on URLs of other services (like facebook). I know I could work with cUrl,... but I see so many obstacles there:…
stoefln
  • 14,498
  • 18
  • 79
  • 138
16
votes
5 answers

Finding a Python Library to Mock a Database

I am about to finish a university project that involves Python, and my team has a test case shortage. We need more, and specifically, we need some test cases for the database. This is where mocking comes in, however. We need a Python-specific…
Michael Minkov
  • 161
  • 1
  • 1
  • 4
16
votes
2 answers

Test detail summary font size too large in Visual Studio 2019

Since upgrading from VS2017 to VS2019 I have noticed that the text in test detail summary windows is comically large making it hard to read test results without a great deal of scrolling. This persists in the latest 16.3.1 version. I assume (and…
Steve Crane
  • 4,340
  • 5
  • 40
  • 63
16
votes
4 answers

Pytest marks: mark entire directory / package

I am testing several versions of a component using Pytest. Some tests can run on all versions, some are version specific. For example tests | |-- version1_tests | |-- test_feature_1_1.py | |-- test_feature_1_2.py | |-- test_feature_1_n.py |…
LoveToCode
  • 788
  • 6
  • 14
16
votes
4 answers

How to pass parameters to the dotnet test command while using NUnit or XUnit

I'm developing some end-to-end tests using C# with .NET Core, Selenium and NUnit. Now i want to write a login testcase. My tests are started from console simply by using the dotnet test command. I simply want to pass username and password to this…
Tobias von Falkenhayn
  • 1,355
  • 5
  • 26
  • 59
16
votes
3 answers

@firebase/testing - How to use auth custom claims in firestore rules tests?

I'm almost good with all my tests for Firestore Rules. But, I still need to test some path for the admin. The admin in my app is not the Firebase admin, it's an user with privileges set like this in its customClaims : claims: {admin: true} How I…
16
votes
2 answers

PHPUnit store properties on test class

I'm a beginner with PHPUnit. This is a sample test class that I've created: class NewTest extends PHPUnit_Framework_TestCase { protected $foo; function testFirst () { $this->foo = true; $this->assertTrue($this->foo); …
mck89
  • 18,918
  • 16
  • 89
  • 106
16
votes
5 answers

Jest - Cannot find module 'source-map' from 'source-map-support.js'

I've got the problem that I get the error: Cannot find module 'source-map' from 'source-map-support.js' Ran all test suites matching /Foo-test/i. T:\public_html\testProj>jest Foo-test FAIL …
Gutelaunetyp
  • 2,144
  • 4
  • 15
  • 40
16
votes
4 answers

Python - Using pytest to skip test unless specified

Background I have am using pytest to test a web scraper that pushes the data to a database. The class only pulls the html and pushes the html to a database to be parsed later. Most of my tests use dummy data to represent the html. Question I…
shane armstrong
  • 185
  • 1
  • 1
  • 7
16
votes
3 answers

How to mock BrowserRouter of react-router-dom using jest

I have this components that renders the routes of an app: https://jsbin.com/bahaxudijo/edit?js, I'm trying to mock the BrowserRouter and the Route to do the test, this are my test: import React from 'react'; import renderer from…
Lizz Parody
  • 1,705
  • 11
  • 29
  • 48
16
votes
2 answers

error: Failed: Template parse errors: 'mat-checkbox' is not a known element

I create this code for testing my component. I tried this code: describe('Component: AddAlarms', () => { let component: AddAlarmsFormComponent; let fixture: ComponentFixture; beforeEach(() => { …
user9699663