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
31
votes
8 answers

How to stop all tests from inside a test or setUp using unittest?

I'm extending the python 2.7 unittest framework to do some function testing. One of the things I would like to do is to stop all the tests from running inside of a test, and inside of a setUpClass() method. Sometimes if a test fails, the program is…
31
votes
3 answers

Espresso test recording feature in Android Studio 2.2

In Android Studio 2.2 there is supposed to be a test recording function? Where do I find it and how do I use it?
31
votes
2 answers

Unit Testing with Firebase

I am building an android app which uses Firebase as the back-end and an model, view, presenter architecture. However, the fact that Firebase is a cloud service complicates the automated testing in my android app. So far I have built most of the…
31
votes
7 answers

running single rails unit/functional test

As title. ruby test/functionals/whatevertest.rb doesn't work, that requires me to replace all require 'test_helper' to require File.dirname(__FILE__) + '/../test_helper'. For some reason most of those test templates have such issue, so I rather to…
William Yeung
  • 10,368
  • 9
  • 36
  • 42
31
votes
4 answers

Browserify - multiple entry points

I am using Browserify within gulp. I am trying to compile down my tests to a single file as well. But unlike my main app, which I have working just fine, I am having trouble getting the tests to compile. The major difference is the tests have…
Matt
  • 2,795
  • 2
  • 29
  • 47
31
votes
6 answers

Behavior Driven Development for java - what framework to use?

For the ongoing projects and for improving our development process we considered adopting TDD as development philosophy. While researching for best practices and how to "sell" the new approach to my colleagues/ developers I came across BDD and found…
Olimpiu POP
  • 5,001
  • 4
  • 34
  • 49
31
votes
10 answers

Automated testing a game

Question How would you go adding automated testing to a game? I believe you can unit test a lot of the game engine's functionality (networking, object creation, memory management, etc), but is it possible to automate test the actual game itself? I'm…
MrValdez
  • 8,515
  • 10
  • 56
  • 79
30
votes
6 answers

aggregating gradle multiproject test results using TestReport

I have a project structure that looks like the below. I want to use the TestReport functionality in Gradle to aggregate all the test results to a single directory. Then I can access all the test results through a single index.html file for ALL…
n4rzul
  • 4,059
  • 7
  • 45
  • 64
30
votes
3 answers

How to check if some text is present on a web page using selenium 2?

Hi I am using selenium to automate test on web pages. I am using selenium 2 and python and would like to have answers in this framework only. SO how do I check whether some text is present or not? I have tried asset equals but it is not…
grv
  • 1,013
  • 2
  • 12
  • 19
29
votes
12 answers

What are the pros and cons of automated Unit Tests vs automated Integration tests?

Recently we have been adding automated tests to our existing java applications. What we have The majority of these tests are integration tests, which may cover a stack of calls like:- HTTP post into a servlet The servlet validates the request and…
WW.
  • 23,793
  • 13
  • 94
  • 121
29
votes
2 answers

how to get text from textview using espresso

I want get text string shown in a textview in LinearLayout. can espresso do that? If not, is there other way to do that or can I use android api in espresso test case? I am using API 17 18 or newer, espresso 1.1(It should be the latest one.). I have…
Nick Dong
  • 3,638
  • 8
  • 47
  • 84
28
votes
3 answers

Spring Boot TestContainers Mapped port can only be obtained after the container is started

I'm trying to add automated testing using the TestContainers library to my Spring Boot project Here is my test class to test my jpa repository: package com.ubm.mfi.repo; import com.ubm.mfi.domain.MasterFileIndexRow; import…
28
votes
7 answers

Selenium multiple tabs at once

I'm working with Selenium, and am wondering if it's possible to use multiple TABS at once? I do not want to use multiple browser instances (i.e., 2 copies of IE pun). IF IT IS NOT possible, how would one go about switching between individual tabs,…
Trevor Tiernan
  • 392
  • 1
  • 3
  • 9
28
votes
5 answers

TestNG: More than one @DataProvider for one @Test

I'm using TestNG for Eclipse. Is it possible to give two data providers step by step to the same test-function? I could put both providers in one, but that is not what I want. I need (not like in this example) to generate independently…
Malte Onken
  • 769
  • 1
  • 9
  • 20
27
votes
8 answers

Is there a capybara for Node.js?

Does anyone know whether there is anything similar to capybara for Node.js?
Chris
  • 4,594
  • 4
  • 29
  • 39