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
55
votes
2 answers

Running a test suite with over a million test cases

We have a distributed test environment with the robotremoteserver starting a bunch of other applications and working with them as part of the test. The test that I am trying to run requires me to run over a million test cases in a single suite. The…
Amol Topkar
  • 551
  • 4
  • 4
54
votes
6 answers

How to check for an element that may not exist using Cypress

I am writing a Cypress test to log in to a website. There are username and password fields and a Submit button. Mostly logins are straightforward, but sometimes a warning dialog appears first that has to be dismissed. I tried…
Charles Anderson
  • 19,321
  • 13
  • 57
  • 73
54
votes
9 answers

Is there any way to automate windows forms testing?

I am familiar with nunit for unit testing of the business layer however I am looking now to automate the test of the win forms gui layer. I have seen watin and the watin recorder for automating tests on web application by accessing the controls…
John
  • 29,788
  • 18
  • 89
  • 130
53
votes
15 answers

Should one test internal implementation, or only test public behaviour?

Given software where ... The system consists of a few subsystems Each subsystem consists of a few components Each component is implemented using many classes ... I like to write automated tests of each subsystem or component. I don't write a test…
51
votes
9 answers

How can I wait for a condition?

I'm new on protractor, and I'm trying to implement an e2e test. I don't know if this is the right way to do this, but... The page that I want to test is not a full angular page based, so... I'm having some trouble. On my first spec I have:…
51
votes
11 answers

Auto-generation of .NET unit tests

Is there such a thing as unit test generation? If so... ...does it work well? ...What are the auto generation solutions that are available for .NET? ...are there examples of using a technology like this? ...is this only good for certain types of…
Phobis
  • 7,524
  • 10
  • 47
  • 76
50
votes
9 answers

Puppeteer: How to handle multiple tabs?

Scenario: Web form for developer app registration with two part workflow. Page 1: Fill out developer app details and click on button to create Application ID, which opens, in a new tab... Page 2: The App ID page. I need to copy the App ID from this…
nwxdev
  • 4,194
  • 3
  • 16
  • 22
50
votes
3 answers

parametrize and running a single test in pytest

How can I run a single test out of a set configured with parametrize? Let's say I have the following test method: @pytest.mark.parametrize(PARAMETERS_LIST, PARAMETERS_VALUES) def test_my_feature(self, param1, param2, param3): """ test doc …
Avishay Cohen
  • 1,978
  • 2
  • 21
  • 34
48
votes
14 answers

Selenium waitForElement

How do I write the function for Selenium to wait for a table with just a class identifier in Python? I'm having a devil of a time learning to use Selenium's Python webdriver functions.
Breedly
  • 12,838
  • 13
  • 59
  • 83
48
votes
3 answers

Boost Test Vs Google Test Framework

I am new to Unit Testing world, basically I am c++ developer working on a large product for almost 3 years, and now I've decided to perform automated unit testing of my code. For this I do lot of research on the internet and came across many tools…
Jame
  • 21,150
  • 37
  • 80
  • 107
48
votes
3 answers

How to unit test console output with mocha on nodejs?

Take into account the following example Javascript code below: function privateFunction (time) { if (time < 12) { console.log('Good morning'); } if (time >= 12 && time <19) { console.log('Good afternoon'); } else { console.log('Good night!');…
Kemel Zaidan
  • 503
  • 1
  • 5
  • 9
47
votes
2 answers

Testing NativeScript app with Appium

I am learning NativeScript. I am trying to write some automated tests with Jasmine. From my understanding, I can use Appium with Jasmine to run automated tests in the emulator. At this time, I've added the appium-gulp-plugins to my package.son file.…
user70192
  • 13,786
  • 51
  • 160
  • 240
47
votes
6 answers

Selenium vs HtmlUnit?

I am trying to understand testing framework better and been looking into Selenium. I've used HTMLUnit before, mainly when I needed to scrape some information off website or the likes. In the context of writing test automation, what's the advantage /…
TS-
  • 4,311
  • 8
  • 40
  • 52
44
votes
12 answers

Cypress does not always executes click on element

I am automating Google Calculator. And from time to time Cypress is not able to execute click on button. The tests click on buttons (0 to 9 ) and do some simple math operations. And in 30% chance it can not click on element and the test will fail.…
Anton
  • 1,344
  • 3
  • 15
  • 32
44
votes
10 answers

Invoking Pylint programmatically

I'd like to invoke the Pylint checker, limited to the error signalling part, as part of my unit testing. So I checked the Pylint executable script, got to the pylint.lint.Run helper class and there I got lost in a quite long __init__ function,…
mariotomo
  • 9,438
  • 8
  • 47
  • 66