João Farias
  • Member for 6 years, 4 months
  • Last seen this week
2 answers
-1 votes
41 views
I am stuck with null pointer exception in page object class
1 votes

As Alexey said, the problem is that you are passing a null to the creation of LoginPage. public WebDriver driver; LoginPage lp = new LoginPage(driver); What you can do is to set up a LoginPage for ...

View answer
1 answers
0 votes
31 views
White Box testing - Condition and Branch
0 votes

What you need to do is to do a boundary analysis: Identify which values of your variables have different meanings/effects in the context of your program (in terms of branch execution - since the paths ...

View answer
1 answers
0 votes
22 views
Override Static Method for TestNg Class
1 votes

One cannot override static methods, more details here. Nonetheless, you can still call it from subclasses, but with a different method (different name or arguments). class AssertWithScreenhot extends ...

View answer
4 answers
3 votes
83 views
Can TDD be a tester task?
1 votes

As others said, it would miss the point. As Kent Beck says in TDD By Example, TDD is about code design. The tests will drive the architecture of your application, by defining its usage step-by-step. ...

View answer
2 answers
0 votes
64 views
How to use explicit wait in POM selenium
1 votes

The Page Object pattern is about creating an API for your pages, to create functions named after actions you can take in the page. Naturally, to perform certain actions, you need to wait certain ...

View answer
2 answers
2 votes
42 views
Unit testing for a non-atomic function if all atomic components have been tested
Accepted answer
3 votes

Unit tests are about checking the public API of a function. In the function below, what matters is input and output. The rest are details that should be mostly hidden in your tests. def non-atomic(...

View answer
1 answers
-1 votes
21 views
Metric for reliability of a software system
0 votes

t is time and e is the Euler number, approximately 2.71828182845904523536028747135266249775724709369995. You can then use the MTTF (in the same period (month, second, year) as t) and get the ...

View answer
1 answers
1 votes
17 views
Unit testing function that reads from pdf - Having dedicated external files?
Accepted answer
0 votes

a function that reads a table from a pdf file and returns a data structure From your description you can see this function breaks the Single Responsibility Principle: 1 - It does the reading of the ...

View answer
3 answers
2 votes
283 views
Measuring integration test efficiency
6 votes

We thought of some sort of limited coverage measurement - checking if collaboration points like app to database, app to external service are covered by tests. Most code coverage tools allow filtering ...

View answer
5 answers
1 votes
73 views
What is intermittent issue in Testing?
0 votes

An intermittent issue is a problem caused by components of your system that you are not paying attention / not under control when testing.

View answer
1 answers
2 votes
133 views
How to verify particular values in JSON response - Postman
Accepted answer
2 votes

You can create a Postman test: pm.test("Checking wardNames", () => { const responseJson = pm.response.json(); pm.expect(responseJson[0].wardName).to.eql(Unit1); pm.expect(...

View answer
1 answers
0 votes
18 views
How is compatibility of business logic tested in microservices?
2 votes

By the book, microservices business logic are independent from each other - built around business capabilities. This is achieved by defining bounded contexts (check it here, here, and here). It means ...

View answer
2 answers
1 votes
58 views
Should I ensure if integrated services are called correctly?
0 votes

You can use a test double of type Spy: In a summary, you would replace the DB with your test-controlled Spy, which registers what are the outputs of SUT (in your case, the queries). You can then look ...

View answer
2 answers
10 votes
508 views
Should integration tests test business logic?
5 votes

I think you fell on the Integrated Tests scam. Integration tests are about "determining if independently developed units of software work correctly when they are connected to each other". ...

View answer
1 answers
3 votes
33 views
In unit tests, should I check all null and invalid child properties in the input arguments that cause error and force developers too?
1 votes

Firstly, in the social aspect of the question, I would avoid using expressions like "force the developer" or "It is a MUST". It may be received as an external interference with the ...

View answer
1 answers
5 votes
224 views
Types of metrics used in QA management
5 votes

First of all, you need to define better what you want to measure. Imagine a sports team. One could say that "improving" means "winning more games" - and one could say that a ...

View answer
1 answers
1 votes
36 views
Selenium Java best practices for handling different languages and locations, and setting dynamic architecture
0 votes

Try avoid this conditional (if locations == "EN"), using dependency injection, on the code that is concerned with the application test itself. You can: Create a module to deal with the data;...

View answer
2 answers
3 votes
47 views
How to effectively test randomness in item ordering?
0 votes

The answer is: Isolate the randomness. You can check this example from Dave Farley where isolated Time: https://www.youtube.com/watch?v=SuDIYk9GBpE&t=1872s Separate the randomly sorting behavior ...

View answer
1 answers
2 votes
547 views
Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver
0 votes

You have most probably not added the proper dependencies. Reference: https://stackoverflow.com/a/61429938 I suggest looking into this response for the steps to do so with a dependency management tool, ...

View answer
1 answers
0 votes
49 views
How to deal with long running operations in End-2-End testing?
1 votes

We do not have direct access to the system that is causing the long waits In the environments that you run your automated checks, you can stub out this system (e.g., using MockServer or WireMock), so ...

View answer
1 answers
1 votes
10 views
Automatic network condition change for MacOS app manual testing
0 votes

You can simply create a stubbed version of your clients objects that simulate some behavior. Then in the tests you inject this stubbed client. interface Client { callTheNetwork(); } class ...

View answer
1 answers
0 votes
16 views
Is it possible to automatically aggregate / collect test results from different projects using Serenity BDD?
0 votes

Serenity BDD generates reports in XML, which allows you to parse programmatically any data you want from them.

View answer
1 answers
0 votes
31 views
how to insert generated id from response , into the endpoint
Accepted answer
1 votes

From RestAssured docs, you can do the following: String json = post(URL_TO_CREATE_ENTITY).asString(); String id = from(json).get("generatedId"); // Or whatever is the name of the attribute ...

View answer
1 answers
1 votes
43 views
How to access dependencies from test class
0 votes

Are there better options to go about managing a large list of dependencies in a clean way? Clean code is highly related to limiting access to dependencies - because depending on many things makes ...

View answer
2 answers
0 votes
76 views
Test case preparation and execution time
5 votes

Firstly, I would be careful when communicating this type of relationship between test cases and your testing, because, test cases are not testing. Promoting otherwise may cause issues both for the ...

View answer
1 answers
0 votes
44 views
Unit vs Component vs System Testing
Accepted answer
2 votes

Disclaimer: There is no standard / widely accepted precise definitions. The best you can do is to learn about the nuances of different contexts, have your own definitions precisely, but when hearing ...

View answer
2 answers
2 votes
240 views
End to end application tests when separate repo for the front-end and back-end tests
1 votes

release for a specific microservice, I am guessing we should still ideally be running application end-to-end tests in addition to the tests from the backend repository Why? The service has checks ...

View answer
3 answers
2 votes
84 views
Why do HTML IDs need to be unique?
0 votes

The meaning of the word "identity" implies its uniqueness. If one says that two things can be identified by the same token, this token doesn't serve to distinguish these things.

View answer
4 answers
5 votes
3k views
Page Object Model from scratch: Best Practices?
1 votes

For starters, it's good to remember that There are good practices in context, but there are no best practices But I've recently written a blog post on a coding kata for the famous Login Page, ...

View answer
3 answers
0 votes
222 views
How to pass text dynamically in xpath under Properties file
Accepted answer
1 votes

You can use the String replace method. String city = prop.getProperty("data"); // New Delhi String locatorTemplate = prop.getProperty("locatorKey"); // div[contains(text(...

View answer
1
2 3 4 5
15