Posts

Showing posts from July, 2015

Microsoft Edge supports Selenium WebDriver

Image
Good news for the test automation folks! In another developer-friendly move, Microsoft announces that its new Edge browser supports the WebDriver automated testing technology. Microsoft may be distancing its new Edge browser from Internet Explorer (IE) and its contentious past, but it is inheriting at least some developer features. In addition to animproved set of F12 tools, the company announced that Edge supports WebDriver, an emerging automated site-testing standard from the World Wide Web Consortium (W3C). Windows Insiders, members of Microsoft's beta program, can test the functionality in build 10240 or newer. The company firstadded WebDriver support to IE 11a year ago. The use of WebDriver with Edge requires running Microsoft WebDriver server software with Microsoft Edge on Windows 10 (build 10240 and above). Microsoft halted downloads of the server after a "publishing issue" cropped up, but the company hopes to restore the software later today (July 24). WebDriver help…

Organize step definitions - Cucumber best practices

Image
Problem: How do we  organize step definitions in the BDD framework as they increase?
If you are using a BDD tool like Specflow/Cucumber/Jbehave  you have to define your step definitions for the feature files. Let's look at different ways to do that:
Journey to Ideal way of organizing step definitions:  Keeping all step definitions in a single class file. This approach quickly becomes impractical with more featuresHaving separate classes. Now you have a new problem - wiring the instances of those classes together.One Class per Feature file - This is good  and also the most common approach except that how would you handle reusable step definitionsReUsableSteps file - Once you recognize that a step is reused, move it to a class ReUsableSteps or something. This way, if a step does not exist in its class then it should be in ReUsableSteps.Step Definition file for each domain concept - This solves the problem of tightly coupled step definitions and keep them logically separated.Page Step …

BDD - Regular expression Generators / Evaluators

Image
If you are using BDD and creating step definitions you surely are using a lot of regex, whatever is your reason to create regex there is no one solution that helps you generate them. What we should realize is that there can't be a perfect regex generator but you definitely  can make use of software that helps you create them.
The closest tool that generates a regex is http://regex.inginf.units.it/\\ It uses a template-based, modularized and very generalized approach to regular expression generation. The expressions it generates works, but they are much more complex than the equivalent hand-crafted expression. Please look at thevideo tutorialhere.
Solution:
The best tools that help you create your own regular expressions are:
http://regexr.com/ https://regex101.com/
Happy Regexing :P




POM file Maven Dependency Injection - CheatSheet

Image
When you depend on a plugin or a dependency, you can use the a version value of LATEST or RELEASE.
LATEST refers to the latest released or snapshot version of a particular artifact, the most recently deployed artifact in a particular repository. RELEASE refers to the last non-snapshot release in the repository.A square bracket ( [ & ] ) means "closed" (inclusive). A parenthesis ( ( & ) ) means "open" (exclusive).Best Practice: In general, it is not a best practice to design software which depends on a non-specific version of an artifact. If you are developing software, you might want to use RELEASE or LATEST as a convenience so that you don't have to update version numbers when a new release of a third-party library is released. When you release software, you should always make sure that your project depends on specific versions to reduce the chances of your build or your project being affected by a software release not under your control. Use LATEST an…

TestNg v/s JUnit Annotations

Image

Eclipse Cheatsheet - on a single page

Image
Happy Coding!