It occurred to me lately, after chatting with some people from the testing community, that not everyone runs automated tests or does any kind of testing in the production environment. For me that seems a bit unnatural, since i have been doing it on all the projects that i worked on. So, here are a few thoughts that might convince you that you do need to run automated tests even in production: Continue reading Why you need to test your production environment
Tag Archives: automation
Checkout my article for TechBeacon on Top 5 Apache Commons utilies for automation engineers: https://techbeacon.com/5-best-apache-commons-utilities-automation-engineers
TestTalk on why automation is fun
Checkout the talk i had with Joe on why automation is fun and why you should also get into automation: https://joecolantonio.com/testtalks/183-test-automation-fun-corina-pip/
Happy listening!
Check that the value you think you typed into a field has actually been typed correctly
You are writing some automated tests with Selenium, that require you to fill in some text fields in a form. You are pretty confident you typed the values you expected to type, into the field you expected to type into. But, here are just 3 reasons why you should write some code that checks that you actually wrote what you thought, where you thought, before submitting the form you are trying to fill in.
Test design: write tests with proper console output to easily identify failure reasons
When automated test are running, they are either running on your own machine (when you write them or run them to check something), or in your CI.
When you run the test on your machine, if there are failures, it might be easy for you to look at what is running (if you have some visual tests, that interact with either browsers or apps on your machine). You can just rerun a failed test and visually inspect for failure reasons. But, if tests are running on a CI machine, visual inspection is either very difficult or even impossible. You might not have access to connect to that machine, or to see how tests are being run. Continue reading Test design: write tests with proper console output to easily identify failure reasons
The tester’s daily dilemma: my automated tests fail because of the test environment. What can i do?
Automated tests. They are there, and they need to be run. On a test environment. By you. You wrote them in a way that they should be reliable, when the features under test work as designed.
But each day you run the same tests on the same test environment, and they fail. Not because the feature under test is not working properly. No. Because of external factors, and by external i mean: hardware issues, network issues, other services that are underlying to your own but are not in your control. And to make it an even more awesome experience, each day you the run the tests, they fail when performing a different step than the one they were performing the day before when they failed. Continue reading The tester’s daily dilemma: my automated tests fail because of the test environment. What can i do?
Removing all digits, non-digits, whitespaces (from Strings) and other usages of replaceAll
Some tasks will require you to replace all occurrences of certain Strings from other Strings with something else, based on a pattern. Or remove all those occurrences. For example, maybe you want to only keep the numeric characters of a String. Or remove all numeric characters. Or maybe remove all white spaces. For this, the replaceAll method comes in handy. Continue reading Removing all digits, non-digits, whitespaces (from Strings) and other usages of replaceAll
Using Maven checkstyle in your project to help adhere to coding standards
Coding standards are something both automating testers and developers should adhere to. Pretty obvious right? Maybe not that obvious might be some of the rules you should follow when writing the code for your tests. Checkstyle is here to help in standardizing your code, so that you can get an early feedback regarding code improvements (earlier than the code review step anyway). It allows you to define a set of basic coding rules that must be followed in your project, and it gives you the opportunity to make your builds fail if someone breaks those rules. This post addresses using checkstyle from a Maven project, by means of the dedicated Maven plugin that you need to declare in your project. Continue reading Using Maven checkstyle in your project to help adhere to coding standards
Better Test Code Principles #5: Mind your try/catches
Using try/catches to handle exceptions has become quite fashionable when writing tests with Java. However, this approach is also a frequent source of having false positives while running tests. Many times when writing the tests people forget to consider both sections of this code block: they forget to write the appropriate code in both sections – the code that deals with not encountering the exception (if the code in try executes) and the code that deals with encountering the exception (if the code in catch executes).
Continue reading Better Test Code Principles #5: Mind your try/catches
A three-course menu for writing your Selenium tests before the feature is complete
How many times does this happen: you start a new iteration/sprint; you give estimates; you realize that the testing work will not be complete in the sprint for certain features?
While analyzing the work that needs to be done in a sprint you tend to think in a sequential manner: developers write the code –> only once the code is complete will the testing begin –> the developers are done with their work within the sprint, the testers are not. Strategies, workarounds and intense thought processing are used to determine how to somehow fit the testing work in the sprint, to not allow it to flow over into the next sprint. Is there an alternative? Yes.
Continue reading A three-course menu for writing your Selenium tests before the feature is complete
