TesterHQ - The Evil Tester Blog Aggregator

Sep 2, 2016 - 4 minute read - Dear Evil Tester Evil Tester

Dear Evil Tester: "How can I learn Automation?"

TLDR; Don’t just ‘learn automation’. Learn it for a reason. When I attend conferences and meetups, people often ask me how they can learn to automate stuff. I then have to ask some follow up questions. This is not my normal approach for a “Dear Evil Tester” answer. A “Dear Evil Tester” answer makes assumptions and takes the question and the words in the question at face value. Because that is funnier, and allows me to address generic points.

Aug 25, 2016 - 1 minute read - FAQ Selenium Simplified Selenium Simplified Blog

How to Select a Web Element with an id containing '.'

TLDR: \. Lesson learned. I was working with a site and trying to select an element via its id e.g. <p id="select.me.by.id">Select Me By My id</p> Simples thought me: #select.me.by.id Nope. So I did what all good Selenium debuggers do… I tried in the browser but Chrome didn’t match it. Tempted though I was to blame Chrome, I tried with XPath, and that worked fine: //p[@id='select.me.by.id'] After a bit of web searching, the solution was clear.

Aug 18, 2016 - 2 minute read - Evil Tester Technical Testing

Remove X-Frame-Options header when testing responsive web applications and sites

TLDR; Some sites issue an X-FRAME-OPTIONS header that stops them loading in an iframe, remove it for responsive web testing with a proxy. Does your favourite responsive testing tool fail to display the site you want to test? Have you blamed the tool and now rely on browser dev tools? Well, here’s a possible solution for you. But before that, let’s look at that situation in more detail: you want to practice your responsive web testing, you have your responsive web testing tool it loads your chosen web site into an iframe your chosen web site doesn’t want to load in an iframe your tool displays a blank image, with no error, instead of the page you curse and go back to the browser dev tools Stop.

Aug 17, 2016 - 5 minute read - Selenium Simplified Blog WebDriver

How to Debug WebDriver JavascriptExecutor in Java

TLDR; JavascriptExecutor requires us to learn JavaScript and use the Browser Console, and check your locator assumptions using FirePath A common theme when debugging WebDriver code is the need to jump between breakpoints, evaluate and browser dev tools. And we shall do exactly that in this ‘how to’, when we look at debugging JavascriptExecutor. This is a hypothetical set of actions built around a sample test I was sent by a blog reader.

Aug 16, 2016 - 3 minute read - Selenium Simplified Blog WebDriver

How to debug chained WebDriver `findElement` methods in Java

TLDR; split code across lines and breakpoint, and use browser dev tools to test the locators used. Have you ever had an argument about fluent code? Discussions about “train wrecks” and “impossible to debug”? WebDriver has the ability to chain findElement calls, and create such “train wrecks”. How do you debug it if you use it? (There is a summary video at the bottom of this post.) Example: WebElement element = driver.

Aug 8, 2016 - 2 minute read - IntelliJ Java For Testers JUnit

How to convert a breakpoint into a conditional breakpoint in IntelliJ

TLDR; right click on a breakpoint and add code that returns a boolean to make it a conditional breakpoint Breakpoints are great. You find the section of code that you want to investigate. Click on the side of the screen to create a breakpoint. Run the code in debug and it stops where you want it. But what if you only wanted to stop on that breakpoint sometimes. What do you do?

Aug 5, 2016 - 1 minute read - Selenium Simplified Blog WebDriver

Selenium WebDriver 3.0.0-beta2 and JUnit and GeckoDriver v 0.10.0

I started to have a look at Selenium WebDriver 3.0.0-beta2 And my @Test methods were running from the IDE, but not running on CI. The effect in CI was, no tests executing at all: Running TestSuite Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@77468bd Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.424 sec I don’t use TestNG, I use JUnit. Since this only happened when I switched to 3.

Aug 5, 2016 - 2 minute read - Selenium Simplified Blog WebDriver

WebDriver Windows 10 Anniversary Build and Edge 14393

TLDR; if your version of Edge is not listed on the WebDriver Edge page, try the insider build. I am experimenting with Selenium WebDriver 3.0.0 beta2 at the moment - more on that later. And this morning I could not get MS Edge to work. I could not understand how the beta was affecting Edge. And then I remembered that I upgraded to Windows 10 Anniversary last night so now Edge is on a new version:

Aug 4, 2016 - 4 minute read - Selenium Simplified Blog WebDriver

Question: What is the best Page Object framework for Java?

TLDR; Q: what is the best Page Object framework? A: I don’t know. I don’t use any Question: What is the best Page Object framework for Java? And are there any tools to build Page Objects e.g. scan the page and create a class with all the @FindBy annotations on WebElements etc. Answer: I don’t know. I have not researched any Page Object frameworks. I don’t use any, and don’t recommend any.

Aug 2, 2016 - 3 minute read - Java For Testers JUnit

Is JUnit only for unit testing? What about system testing or UAT?

TLDR; We can use JUnit to execute code to support any type of testing. Question: Hi, you use Junit in the book “Java For Testers” and I thought JUnit was used for “unit testing” and “unit testing” was performed by developers , not testers. Is the purpose to learn JUnit and “unit testing” or other types of testing as well? In other words, would you recommend learning “java for Testers” to software testers who would rather not be involved in “unit testing” but rather involved in “system and UAT”?