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
149
votes
15 answers

WatiN or Selenium?

I'm going to start coding some automated tests of our presentation soon. It seems that everyone recommends WatiN and Selenium. Which do you prefer for automated testing of ASP.NET web forms? Which of these products work better for you? As a side…
DavGarcia
  • 18,540
  • 14
  • 58
  • 96
128
votes
11 answers

Run code once before and after ALL tests in xUnit.net

TL;DR - I'm looking for xUnit's equivalent of MSTest's AssemblyInitialize (aka the ONE feature it has that I like). Specifically I'm looking for it because I have some Selenium smoke tests which I would like to be able to run with no other…
George Mauer
  • 117,483
  • 131
  • 382
  • 612
95
votes
8 answers

Alpine Docker ERROR: Unable to lock database: Permission denied ERROR: Failed to open apk database: Permission denied

So I have used the default docker for testcafe which on docker hub is testcafe/testcafe and I have to run a few testcafe scripts. However, I need the screenshot that fires on error, to be uploaded to somewhere where I can look at it later after…
Vladimir_314159
  • 1,457
  • 1
  • 9
  • 21
86
votes
9 answers

Gradle Test Dependency

I have two projects, project A and Project B. Both are written in groovy and use gradle as their build system. Project A requires project B. This holds for both the compile and test code. How can I configure that the test classes of project A…
86
votes
10 answers

How to test a confirm dialog with Cucumber?

I am using Ruby on Rails with Cucumber and Capybara. How would I go about testing a simple confirm command ("Are you sure?")? Also, where could I find further documentation on this issue?
Yuval Karmi
  • 26,277
  • 39
  • 124
  • 175
81
votes
14 answers

How do you test an Android application across multiple Activities?

We are building a complex Android application consisting of many screens and workflows spread across many Activities. Our workflows are similar to what you might see on a Bank's ATM machine, for example, there is an Activity to login in that…
SingleShot
  • 18,821
  • 13
  • 71
  • 101
80
votes
8 answers

unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)

Getting the following error when running rspec tests unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) in rails Using latest ruby (1.9.2) and firefox (6.0) Using rspec-rails, capybara and several other gems, but they…
Srini K
  • 3,315
  • 10
  • 37
  • 47
80
votes
4 answers

Cypress get href attribute

I have a test case in which I have a link which opens in a new tab. Since Cypress doesn't support multiple tabs, I want to get the href attribute of that link and then open it in the same tab. I'm trying to do it this way, but for some reason it…
Max
  • 803
  • 1
  • 6
  • 5
75
votes
13 answers

Automated tests for Java Swing GUIs

What options are there for building automated tests for GUIs written in Java Swing? I'd like to test some GUIs which have been written using the NetBeans Swing GUI Builder, so something that works without requiring special tampering of the code…
pauldoo
  • 18,087
  • 20
  • 94
  • 116
75
votes
10 answers

Instrumentation run failed due to 'Process crashed.'

I wanted to run the following test: package com.xxx.yyy; import android.content.Context; import androidx.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import…
gurehbgui
  • 14,236
  • 32
  • 106
  • 178
73
votes
12 answers

Does Selenium support headless browser testing?

I'm looking at Selenium Server at the moment, and I don't seem to notice a driver that supports headless browser testing. Unless I'm mistaken, it doesn't support it. If you're on X, you can create a virtual framebuffer to hide the browser window,…
72
votes
14 answers

Automated testing for iPhone

I know this one is going to be a long-shot, but I thought I'd try. Does anyone know of any automated test anything for the iPhone simulator? I'd love it if there was something like Selenium but for the iPhone simulator. I don't need anything…
sammich
  • 335
  • 5
  • 13
  • 19
70
votes
19 answers

Unit test adoption

We have tried to introduce unit testing to our current project but it doesn't seem to be working. The extra code seems to have become a maintenance headache as when our internal Framework changes we have to go around and fix any unit tests that hang…
Burt
  • 7,680
  • 18
  • 71
  • 127
65
votes
3 answers

What's the difference between tests and specs?

I decided to try out MiniTest and noticed pretty quickly that it supported something called "specs". I had seen these referenced before but thought it was just an alternate test syntax associated with factories, but if that were the case then why…
Oblivious Sage
  • 3,326
  • 6
  • 37
  • 58
57
votes
4 answers

Where should I put data for automated tests with testthat?

I am using Hadley's testthat-based approach for automated testing of my package. With this approach, what is the most suitable place to put test data files that is files only used by the test scripts in tests/testthat), but not by any other…
Aditya
  • 1,554
  • 1
  • 13
  • 23