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
14
votes
3 answers

How to test Keycloak authentication in Spring Boot application?

In a Spring Boot project we enabled Spring Security and applied Keycloak authentication with bearer token like described in the following…
radistao
  • 14,889
  • 11
  • 66
  • 92
14
votes
5 answers

Data driven testing in MSTest - problem with TestContext.DataRow

I'm having essentially the same problem as the question linked below, but I cannot seem to get it to work. I'm getting "cannot apply indexing [] to an expression of type System.Data.DataRow". As far as I can tell, I have implemented the solution…
bq1990
  • 367
  • 1
  • 4
  • 9
14
votes
5 answers

Why use Page Factory?

I am a new test engineer and have been reading about Page Object Model and implementing them and keep coming across Page Factory. I understand that Page Factory is a POM that provides additional features such as instantiating all elements when…
Haendler
  • 313
  • 1
  • 2
  • 10
14
votes
2 answers

One test watcher to report results of individual tests in JUnit Suite

So I have a suite, something like this: @RunWith(Suite.class) @Suite.SuiteClasses({TestClass1.class, TestClass2.class, TestClass3.class}) public class TestSuite { static List extentTestList = new ArrayList<>(); @ClassRule …
14
votes
3 answers

Correct way to use IdlingResource in Espresso Android

I'm writing UI tests with Espresso. App cooperates tightly with server, so in many cases, I need to wait for either value to be calculated, or data is got and displayed, etc. Espresso suggests using IdlingResource for this. My IdlingResource…
Lanitka
  • 922
  • 1
  • 10
  • 20
14
votes
2 answers

TestNG skips test after raising Exception in @DataProvider method

I'm a bit confused. How can I get TestNG to report an error for a test? // ... @DataProvider(name = "foo") public Object[][] provideData () { throw new SomeRuntimeException("Some error occurred. The test configuration " + "is somehow…
Doe Johnson
  • 1,374
  • 13
  • 34
14
votes
11 answers

How to perform drag and drop using selenium-webdriver when target and destination element are in different frames?

I have to drag an image and drop it into a CQ5 component. The image and component are in different frames. Here is the code which did not work as webelement destinationcould not be found when the target's frame was active. new…
9ikhan
  • 1,177
  • 3
  • 11
  • 22
13
votes
5 answers

How to Automate Testing of Medium Trust Code

I would like to write automated tests that run in medium trust and fail if they require full trust. I am writing a library where some functionality is only available in full trust scenarios and I want to verify that the code I wish to run in medium…
Ian Davis
  • 3,848
  • 1
  • 24
  • 30
13
votes
1 answer

Running selenium test with maven-surefire-plugin or maven-failsafe-plugin?

i am confused between the concept of using maven-surefire-plugin or maven-failsafe-plugin to run my selenium tests in integration test phase (without running unit tests) i see some examples uses maven-surefire-plugin and other examples uses…
13
votes
1 answer

How to reduce phantomjs memory consumption?

I'm using phantomjs with casperjs to run multiple tests and it looks like each instance of PhantomJS takes ~106M of RAM. Is it possible to reduce that amount? Is there a simple way to run tests in multiple "tabs"?
Fluffy
  • 27,504
  • 41
  • 151
  • 234
13
votes
2 answers

How can I reliably wait for JavaScript alerts using Selenium2 / WebDriver?

I am currently assisting in a proof of concept using Selenium 2 / WebDriver with C# against an ASP.NET MVC application using the InternetExplorerDriver. The application uses a standard pattern for notifying users that a record has saved. This works…
Paul Williams
  • 386
  • 7
  • 20
13
votes
1 answer

'!_debugInitialized': is not true while running flutter integration tests

I am trying to run a basic flutter integration test to invoke my main app widget but it's failing. I have followed the approach as described in the official docs [https://docs.flutter.dev/testing/integration-tests] Here is the complete stack…
Bhupesh Varshney
  • 1,522
  • 14
  • 19
13
votes
4 answers

Playwright before each for all spec files

I very new to Playwright. Due to my test suites, I need to login into my application before running each test. Inside a single spec file that is easy, I can simply call test.beforeEach. My issue is: I need to before the login before each test of…
Pelicer
  • 1,348
  • 4
  • 23
  • 54
13
votes
2 answers

How to make virtual time pass in a test in Cats Effect 3?

I am trying to convert Mules to Cats Effect 3 (CE3). Since it is a caching library, in its tests it needs (virtual) time to pass to test whether items will be expired. It is currently making fairly heavy use of cats.effect.laws.util.TestContext,…
Keith Pinson
  • 7,835
  • 7
  • 61
  • 104
13
votes
3 answers

How to wait for requests and validate responses using playwright?

This is my first time using playwright and I can't figure out how to wait for requests and validate responses. I've been using cypress for a quite a long time, and it was pretty easy to manage network requests. For example, I need to validate…
Vladimir Krygin
  • 439
  • 2
  • 6
  • 18