Questions tagged [automated-tests]

Test automation is the use of software to control the execution of tests, the comparison of actual outcomes to predicted outcomes, the setting up of test preconditions, and other test control and test reporting functions. Commonly, test automation involves automating a manual process already in place that uses a formalized testing process (wikipedia.org).

As per wikipedia.org:

Test automation is the use of software to control the execution of tests, the comparison of actual outcomes to predicted outcomes, the setting up of test preconditions, and other test control and test reporting functions. Commonly, test automation involves automating a manual process already in place that uses a formalized testing process.

There are two general approaches to test automation:

Code-driven testing. The public (usually) interfaces to classes, modules or libraries are tested with a variety of input arguments to validate that the results that are returned are correct.

Graphical user interface testing. A testing framework generates user interface events such as keystrokes and mouse clicks, and observes the changes that result in the user interface, to validate that the observable behavior of the program is correct.

The principle of automated testing is that there is a program (which could be a job stream) that runs the program being tested, feeding it the proper input, and checking the output against the output that was expected. Once the test suite is written, no human intervention is needed, either to run the program or to look to see if it worked; the test suite does all that, and somehow indicates whether the program's output was as expected.

Test Automation also has dedicated section in Software QA & Testing community.

13134 questions
44
votes
9 answers

Automated link-checker for system testing

I often have to work with fragile legacy websites that break in unexpected ways when logic or configuration are updated. I don't have the time or knowledge of the system needed to create a Selenium script. Besides, I don't want to check a specific…
ctford
  • 7,189
  • 4
  • 34
  • 51
43
votes
3 answers

Best practice for setting up an automated build server for iphone apps?

I'm looking to setup an automated nightly build server for our iphone apps, and looking for advice on what works and what doesn't. Basically, something that at least nightly runs all the unit tests and publishes a new adhoc build to our internal…
JosephH
  • 37,173
  • 19
  • 130
  • 154
43
votes
4 answers

What is the difference between .// and //* in XPath?

While finding the relative XPath via Firebug : it creates like .//*[@id='Passwd']--------- what if we dont use dot at the start what it signifies? Just add //* in the Xpath -- it highlights --- various page elements ---------- what does it…
Mohit
  • 595
  • 1
  • 6
  • 16
42
votes
6 answers

Is there an easy way in xunit.net to compare two collections without regarding the items' order?

In one of my tests, I want to ensure that a collection has certain items. Therefore, I want to compare this collection with the items of an expected collection not regarding the order of the items. Currently, my test code looks somewhat like…
feO2x
  • 5,358
  • 2
  • 37
  • 46
41
votes
6 answers

Check response header's value in Postman tests

I would like to check the value from a concrete response header ("Location") as Test Results in Postman. In the Postman's documentation I found examples of how to check the existance of headers with pm.test("Content-Type is present", function () { …
Lluís Suñol
  • 3,466
  • 3
  • 22
  • 33
41
votes
5 answers

Saving a Postman header value into a variable throughout requests in a collection

I am trying to automate my test suite in Postman so that I don't have to manually go into each request and change that header value to what I initially put in the first request. My test suite currently looks like: First Request: var headerValue =…
jmcode
  • 511
  • 1
  • 4
  • 5
41
votes
6 answers

How do I skip a Maven plugin execution if "-DskipTests" or "-Dmaven.test.skip=true" is specified?

I'm using Maven 3.0.3. I have this plugin, which normally I want to run before my JUnit tests are executed: dev true
Dave
  • 15,639
  • 133
  • 442
  • 830
40
votes
3 answers

Expected build-failure tests in CMake

Sometimes it's good to check that certain things fail to build, e.g.: // Next line should fail to compile: can't convert const iterator to iterator. my_new_container_type::iterator it = my_new_container_type::const_iterator(); Is it possible to…
Ami Tavory
  • 74,578
  • 11
  • 141
  • 185
40
votes
4 answers

Testing d3 (and other SVG based) Web Applications

I have a web application that uses the d3 library for some complex SVG based visualizations. I have automated tests for my server side code and JavaScript models (I use an MVC like architecture in my JavaScript). These are run on a Jenkins CI…
RichH
  • 6,108
  • 1
  • 37
  • 61
40
votes
19 answers

Writing "unit testable" code?

What kind of practices do you use to make your code more unit testing friendly?
TWA
  • 12,756
  • 13
  • 56
  • 92
39
votes
5 answers

How to create and run Apache JMeter Test Scripts from a Java program?

I want to use the API provided by Apache JMeter to create and run test scripts from a Java program. I have understood the basics of ThreadGroup and Samplers. I can create those in my Java class by using the JMeter API. ThreadGroup threadGroup = new…
Alim Ul Gias
  • 6,351
  • 2
  • 28
  • 39
39
votes
2 answers

What are the best practices for testing "different layers" in Django?

I'm NOT new to testing, but got really confused with the mess of recommendations for testing different layers in Django. Some recommend (and they are right) to avoid Doctests in the model as they are not maintainable... Others say don't use…
Soask
  • 691
  • 12
  • 21
38
votes
4 answers

Py.test: parametrize test cases from classes

I'm currently following this py.test example and it works out when I do not use classes, however when I introduce test cases into classes I am failing. The smallest case I managed to write is the following: import unittest import pytest class…
pafede2
  • 1,626
  • 4
  • 23
  • 40
37
votes
1 answer

Can I link multiple BOOST unit tests into a single test binary?

I've recently started trying to put a venerable and large (>1 million lines) program under test. There are currently no unit tests. Also, the program is linked as each individual file being linked together - there are no component libraries. …
dbn
  • 13,144
  • 3
  • 60
  • 86
37
votes
8 answers

What is the best way to test webforms apps ( ASP.NET )

What is the best way to test my webforms applications? Looks like people are loving Watin, and selenium.
Brian G
  • 53,704
  • 58
  • 125
  • 140