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

JUnit test report enrichment with JavaDoc

For a customer we need to generate detailed test reports for integration tests which not only show, that everything is green, but also what the test did. My colleagues and I are lazy guys and we do not want to hack spreadsheets or text…
36
votes
6 answers

Cypress - How can I run test files in order

When I press the "run all specs" button or use the run command that runs all files in Cypress it runs all test files alphabetically, so I don't want that. I want to sort all of them with my own rules. Let's say I have 3 steps in a chat app…
WouX
  • 363
  • 1
  • 3
  • 5
36
votes
8 answers

Android testing: Waited for the root of the view hierarchy to have window focus

In Android Ui testing, I want to click on a spinner item in a dialog, but it pop up with this error: va.lang.RuntimeException: Waited for the root of the view hierarchy to have window focus and not be requesting layout for over 10 seconds. If you…
36
votes
9 answers

How to skip the rest of tests in the class if one has failed?

I'm creating the test cases for web-tests using Jenkins, Python, Selenium2(webdriver) and Py.test frameworks. So far I'm organizing my tests in the following structure: each Class is the Test Case and each test_ method is a Test Step. This…
Alex Okrushko
  • 7,212
  • 6
  • 44
  • 63
34
votes
17 answers

What is the best automated website UI testing framework

What are the good automated web UI testing tools? I want to be able to use it in the .Net world - but it doesn't have to written in .net. Features such as a record mode, integration into build process\ continuous integration would be nice. Im going…
Dan
  • 29,100
  • 43
  • 148
  • 207
34
votes
5 answers

Best way to intercept XHR request on page with Puppeteer and return mock response

I need to be able to intercept XHR requests on page loaded with Puppeteer and return mock responses in order to organize backendless testing for my web app. What's the best way to do this?
s.ermakovich
  • 2,641
  • 2
  • 26
  • 24
33
votes
4 answers

Is there a good IE-based Selenium IDE?

The SeleniumIDE project is based on Firefox (and its plugin architecture). My application (for a variety of reasons) only runs on Internet Explorer (6+). In fact, we actively check for non-IE browsers and do an immediate redirect. This is a 6…
Jay Stevens
  • 5,863
  • 9
  • 44
  • 67
33
votes
6 answers

cy.url() and/or cy.location('href') does not return a string

I have an editor page. When I add any content and click the "Save" button my URL will change, adding a random id in the URL. I want to check if my ID's are changing every time when I click the "Save button". I save the URL result in variable and…
Narine Poghosyan
  • 853
  • 3
  • 16
  • 26
33
votes
5 answers

How do you create tests for "make check" with GNU autotools

I'm using GNU autotools for the build system on a particular project. I want to start writing automated tests for verifcation. I would like to just type "make check" to have it automatically run these. My project is in C++, although I am still…
Greg Rogers
  • 35,641
  • 17
  • 67
  • 94
32
votes
3 answers

Is the .should('exist') assertion redundant on Cypress?

Let's consider the case where I need to assert if an element exists. There are 2 possible ways of doing this in cypress: 1) cy.get('button').contains('Save') 2) cy.get('button').contains('Save').should('exist') In both cases the test will fail if…
ITguy
  • 847
  • 2
  • 10
  • 25
32
votes
2 answers

How to provide login credentials to an automated android test?

I'm looking for a way to "provide a login" to my app so an automated test "is logged in" and can test the entire app. Currently it's of course blocked by the login-screen. Because I'm using SmartLock for Passwords, this might be a chance to provide…
32
votes
4 answers

How to compare two images using Node.js

I am looking for a way to compare two images to see how similar they are. Googling it produces tons of image processing results (cropping, re-sizing, etc.), but nothing that would do approximate comparisons of images. There is one Node.js library,…
SergeyB
  • 9,478
  • 4
  • 33
  • 47
31
votes
5 answers

How to get the unit test method name at runtime from within the unit test?

How to get the unit test name from the within unit test? I have the below method inside a BaseTestFixture Class: public string GetCallerMethodName() { var stackTrace = new StackTrace(); StackFrame stackFrame = stackTrace.GetFrame(1); …
The Light
  • 26,341
  • 62
  • 176
  • 258
31
votes
5 answers

Running Selenium scripts with JMeter

I have Selenium automation scripts ready with functional flow, now I want to integrate those scripts with JMeter for load-testing. Is that possible? If so how to integrate both? My first aim is to run the automation script using selenium than run…
Rahul Mendiratta
  • 615
  • 1
  • 6
  • 14
31
votes
4 answers

TestNG dependsOnMethods from different class

The dependsOnMethods attribute of the @Test annotation works fine when the test to be depended upon is in the same class as that of the test that has this annotation. But it does not work if the to-be-tested method and depended-upon method are in…
brayne
  • 1,355
  • 2
  • 16
  • 27