Hot answers tagged

5

When using this API, you should be describing errors In JUnit, this signature is described quite clearly in the Javadoc (emphasis mine) Parameters: reason - additional information about the error actual - the computed value being compared matcher - an expression, built of Matchers, specifying allowed values What you're describing by ...


4

The TDD cycle is more a development cycle for a developer, to quote James Shore, The Art of Agile, Test-Driven Development chapter: Programmers new to TDD are often surprised at how small each increment can be. Although you might think that only beginners need to work in small steps, my experience is the reverse: the more TDD experience you have, ...


4

Check below are the various methods to scroll your page up & down. Scroll Down: import org.openqa.selenium.JavascriptExecutor; WebDriver driver = new FirefoxDriver(); JavascriptExecutor jse = (JavascriptExecutor)driver; jse.executeScript("scroll(0, 250)"); //y value '250' can be altered Scroll up: JavascriptExecutor jse = (JavascriptExecutor)driver; ...


3

One way is to use a singleton class like this: public class FirefoxDriverProvider { private static FirefoxDriver instance = null; public static FirefoxDriver getInstance() { if (instance == null) { instance = ... initialize FirefoxDriver here ...; } return instance; } } In your TestNG classes, you can do ...


3

If developers also write unit tests, then what's the point of having special testers in our team and should we replace testers with developers? Unit testing is not the only kind of automated testing. Integration tests, performance tests, scalability tests, and fault tolerance tests are all examples of automated tests that are not unit tests and that a ...


3

Spin up your own test environment and test against that. Let's face it, a public facing web page that's designed to attract DDOS testing isn't going to be a valid test candidate. The reason for this is that you'll not know how many other users are hitting a public server or the spec of the environment. If you ran 100 simultaneous users and the site went ...


3

I'd plan it this way: The specific tests that are written 'before the code' are unit tests that are written by developers just before they write the actual code. It should only take 5-20 minutes to write a simple test. The test is written, the code is written for it and then the test is changed or the next test is written and then more unit level code is ...


2

In my organization we are using Jira as test management tool and Selenium for UI automation.The framework used is TestNG. There is a plugin for Jira called Hiptest which can be used for creating and executing test cases. It has an additional option to work it with on automation too. Hiptest is good from my small experience. Simple to run test suites and ...


2

Given that there are already YAML parsers out there for a variety of languages, I'd be very tempted to use one of those as an oracle, and then have both parse arbitrary YAML files, and compare the output.


2

Unit test should be written by developers. Unit test are very close to the core code and developers have intimate knowledge of how units should work. testers are usually more removed from the deep innards of the core code and they will not be ass effective writing unit tests as core developers are. Acceptance/integration/end-to-end test do not require this ...


2

Instead of voting for closing I am going to use your question as an example to how not to ask questions. How are we supposed to know what do you need ? we don't know what the product is, what are the company's future plans for the product or testing, what is the budget and how much time do you have or can spend automating stuff, what's your priorities, how ...


1

My preferred practice for assertion messages is to make assertion messages unnecessary. And my usual way of doing that: Write one assertion per test method. Name the test method to describe the responsibility being tested. This way, when the assertion fails, the name of the test tells me most of what I need to know to diagnose the problem. And the ...


1

Using priority to drive order of execution is perfectly fine, but question is why do you want to execute test cases in certain order? As a general rule test case should be atomic and should not be dependent on another test cases. In such case do you worry about order of execution. I rather don't pay much attention to order of execution unless its an explicit ...


1

In your position I would look at creating a single JUnit test that loops through the csv rows and behaves accordingly based on the parameters given in each row. I assume you haven't done it like this for reportability reasons? You want to be able to get feedback on each row or something like that? It is possible to hack at the TestRunner to do something ...



Only top voted, non community-wiki answers of a minimum length are eligible