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
134
votes
10 answers

Practicing BDD with python

Which are the most advanced frameworks and tools there are available for python for practicing Behavior Driven Development? Especially finding similar tools as rspec and mocha for ruby would be great.
JtR
  • 20,568
  • 17
  • 46
  • 60
133
votes
13 answers

Can I run multiple versions of Google Chrome on the same machine? (Mac or Windows)

This fabulous answer suggests there’s no way to run multiple versions of Google Chrome on one machine. Every now and then you’ll get a website user stuck on an old version of Chrome (no idea how, but it happens — maybe they installed the standalone…
Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
133
votes
5 answers

How to Test a Concern in Rails

Given that I have a Personable concern in my Rails 4 application which has a full_name method, how would I go about testing this using RSpec? concerns/personable.rb module Personable extend ActiveSupport::Concern def full_name …
Kyle Decot
  • 20,715
  • 39
  • 142
  • 263
133
votes
10 answers

How to run Rails console in the test environment and load test_helper.rb?

The background: I'm having some problems with Thoughtbot's "Factory Girl" gem, with is used to create objects to use in unit and other tests. I'd like to go to the console and run different Factory Girl calls to check out what's happening. For…
Ethan
  • 57,819
  • 63
  • 187
  • 237
133
votes
9 answers

How to develop and test an app that sends emails (without filling someone's mailbox with test data)?

I have a lot of apps that send email. Sometimes it's one or two messages at a time. Sometimes it's thousands of messages. In development, I usually test by substituting my own address for any recipient addresses. I'm sure that's what everybody else…
Patrick McElhaney
  • 57,901
  • 40
  • 134
  • 167
132
votes
8 answers

All Ruby tests raising: undefined method `authenticate' for nil:NilClass

Most of my tests are raising the following and I don't understand why. All methods call raise the 'authenticate' error. I've checked the code if there was a method called "authenticate" but there is no such method. 1) Admin::CommentsController…
Jeffrey W.
  • 4,169
  • 3
  • 17
  • 18
132
votes
6 answers

How to build a jar using maven, ignoring test results?

Actuality when i run tests they fails but i need to run them to get some .class files which are very important for my jar. By default when test results fails , the jar is not build , could i add a setting in pom.xml which ignore that, so I can build…
user398920
  • 1,421
  • 2
  • 12
  • 10
131
votes
6 answers

What is the best testing framework to use with Node.js?

I have looked at the rather long list of testing frameworks at https://github.com/ry/node/wiki/modules#testing. What is the experience with these frameworks? Obviously the ability to run in the browser would be a big bonus, but I'm mainly interested…
doffm
  • 1,335
  • 2
  • 9
  • 3
131
votes
2 answers

angular2 testing: Can't bind to 'ngModel' since it isn't a known property of 'input'

I am trying to test angular2 two-way binding for control input. Here is the error: Can't bind to 'ngModel' since it isn't a known property of 'input'. The app.component.html
beewest
  • 4,486
  • 7
  • 36
  • 63
131
votes
8 answers

How to load db:seed data into test database automatically?

I'm attempting to use the new standard way of loading seed data in Rails 2.3.4+, the db:seed rake task. I'm loading constant data, which is required for my application to really function correctly. What's the best way to get the db:seed task to run…
Luke Francl
  • 31,028
  • 18
  • 69
  • 91
130
votes
18 answers

Property 'toBeInTheDocument' does not exist on type 'Matchers'

I'm trying to write tests for my simple React App that creates a UI for a dog Shelter using API etc. I have imported the modules shown below and ran the following command npm install jest-dom react-testing-library --save-dev However, I'm getting…
mangokitty
  • 1,759
  • 3
  • 12
  • 17
129
votes
13 answers

What's a good way to overwrite DateTime.Now during testing?

I've got some (C#) code that relies on today's date to correctly calculate things in the future. If I use today's date in the testing, I have to repeat the calculation in the test, which doesn't feel right. What's the best way to set the date to a…
Craig.Nicol
  • 1,834
  • 2
  • 15
  • 20
128
votes
3 answers

Google Play Store Internal Test cannot start roll out

I am going to start rolling out the first version of the application to the internal testers. But the button START ROLLOUT TO INTERNAL TEST is disabled and I cannot see any other error messages or warnings here. Can anyone let me know what's…
Cool Eagle
  • 1,826
  • 3
  • 11
  • 16
128
votes
4 answers

Difference between Mock / Stub / Spy in Spock test framework

I don't understand the difference between Mock, Stub, and Spy in Spock testing and the tutorials I have been looking at online don't explain them in detail.
letter Q
  • 14,735
  • 33
  • 79
  • 118
128
votes
14 answers

Thread.sleep( ) with Espresso

Espresso claims that there is no need for Thread.sleep() but my code doesn't work unless I include it. I am connecting to an IP and, while connecting, a progress dialog is shown. I need a Thread.sleep() call to wait for the dialog to dismiss. This…
Chad Bingham
  • 32,650
  • 19
  • 86
  • 115