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
17
votes
6 answers

django test database is not created with utf8

I am using utf-8 general case insensitive for for mysql database, but django creates a test db with latin collation I have set this: TEST_CHARSET="utf8_general_ci" TEST_COLLATION="utf8_general_ci" In the settings file, but to no avail. What else…
vasion
  • 1,237
  • 3
  • 18
  • 29
17
votes
4 answers

JMeter with remote servers

I'm trying to setup JMeter in a distributed mode. I have a server running on an ec2 intance, and I want the master to run on my local computer. I had to jump through some hopes to get RMI working correctly on the server but was solved with setting…
winna
  • 539
  • 1
  • 3
  • 16
17
votes
5 answers

Windows: How to test UI under high-dpi?

i want to test how my application reacts to high-dpi settings. i don't just mean 120dpi. i want to test higher dpi settings, such as: 150dpi 300dpi 600dpi 1000dpi 1200dpi My development machine's video card cannot do the resolutions required to…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
17
votes
7 answers

Are there any good online tutorials to TDD for an experienced programmer who is new to testing?

I'm working with a Python development team who is experienced with programming in Python, but is just now trying to pick up TDD. Since I have some experience working with TDD myself, I've been asked to give a presentation on it. Mainly, I'm just…
Jason Baker
  • 192,085
  • 135
  • 376
  • 510
17
votes
2 answers

How can I throw an Exception with a certain HResult?

I want to test the following code: private bool TestException(Exception ex) { if ((Marshal.GetHRForException(ex) & 0xFFFF) == 0x4005) { return true; } return false; } I'd like to set up the Exception object somehow to return…
g t
  • 7,287
  • 7
  • 50
  • 85
17
votes
6 answers

Best way to add tests to an existing Rails project?

I have a Rails project which I neglected to build tests for (for shame!) and the code base has gotten pretty large. A friend of mine said that RSpec was a pain to use unless you use it from the beginning. Is this true? What would make him say…
Zach
  • 24,496
  • 9
  • 43
  • 50
17
votes
5 answers

How to solve
that includes file upload and other text input, on the same page

I need help with my form. There's a mix of input, textarea and file upload that i want to enter into the database.. What do I use in the ? Do I use the normal form attribute : or
user652792
17
votes
2 answers

Python...testing classes?

In python, how do we write test cases for our classes? For example: class Employee(object): num_employees = 0 # numEmployess is incremented each time an employee is constructed def __init__(self, salary=0.0, firstName="", lastName="", ssID="",…
VPNTIME
  • 721
  • 2
  • 8
  • 13
16
votes
4 answers

How to test for thread safety

Do you have any advices how to test a multithreaded application? I know, threading errors are very difficult to catch and they may occur at anytime - or not at all. Tests are difficult and the results are never for sure. Certainly it is best to…
tanascius
  • 53,078
  • 22
  • 114
  • 136
16
votes
1 answer

Unit Test a file upload, how?

Using MVC3.NET I have a file upload method in a controller that works fine with the following signature public ActionResult UploadFile(IEnumerable file) How can I unit test this with NUnit? I have looked around and everyone seems…
DevDave
  • 6,700
  • 12
  • 65
  • 99
16
votes
14 answers

Quick and easy way to test OSGi bundles

Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable. We're using the OSGi framework (Equinox implementation) to manage our plug ins. My problem…
fluffels
  • 4,051
  • 7
  • 35
  • 53
16
votes
4 answers

Test if stdin has input for C++ (windows and/or linux)

I basically want to test if stdin has input (like if you echo and pipe it). I have found solutions that work, but they are ugly, and I like my solutions to be clean. On linux I use this: bool StdinOpen() { FILE* handle = popen("test -p…
norcalli
  • 1,215
  • 2
  • 11
  • 22
16
votes
4 answers

Automated memory leak detection in Java

I was thinking about automated memory leak detection for a Java program. The basic algorithm is to create JUnits that contain the following logic: Call System.gc() several times Determine initial heap memory consumption using either Runtime class…
David
  • 161
  • 1
  • 4
16
votes
2 answers

how can I test accepts_nested_attributes_for with Rspec Rails3

I have a model as follows: class Greeting < ActiveRecord::Base attr_accessible :headline, :icon, :content belongs_to :user accepts_nested_attributes_for :user, :reject_if => proc { |a| a[:name].blank? || a[:email].blank? } How can I do…
chell
  • 7,646
  • 16
  • 74
  • 140
16
votes
1 answer

Unable to use getByRole on listitem with a specific name - RTL

My apologies If this is a duplicate question. I couldn't find an answer anywhere else. Component:
  • Pending tasks
Test code: expect(getByRole("listitem", { name: "Pending tasks"…
rehman_00001
  • 1,299
  • 1
  • 15
  • 28