Friday, July 8, 2016

Oracle Breaking the Silence on Java?

Oracle Breaking the Silence on Java?

Mike Moeller, a VP of Marketing Communications with Oracle, was quoted by The Register's Chris Williams on Oracle's future plans for Java. 
From The Register:
"Oracle is committed to Java and has a very well defined proposal for the next version of the Java EE specification – Java EE 8 – that will support developers as they seek to build new applications that are designed using micro-services on large-scale distributed computing and container-based environments on the Cloud." - Mike 

If true, this is good news for the Java community as well as the many companies that rely on Java to power their businesses and the millions of people who earn a living using Java technologies. The statement seems to validate the grass roots campaign by the Java EE Guardians that have been pressuring Oracle to speak up on the future of Java. The Guardians have gained support from a growing number of Java luminaries over the past few months, and the high-profile reputations and community influence given many of these supporters would have made JavaOne somewhat uncomfortable.
A second statement attributed to Moeller in The Register may raise additional questions.
"Oracle is working closely with key partners in the Java community to finalize the proposal and will share the full details with the broader Java community at JavaOne in September." - Mike Moeller
One might ask who these key partners are, and how have those partners (and more specifically their employees) managed to remain silent all this time while many in the community were seeking answers? If we give Oracle the benefit of the doubt and assume they are indeed "working closely with key partners", there are clear suspects as to who those partners might be. 
Annual events like JavaOne are designed for big announcements, but how about something to appease the masses in the meantime? And something a bit more "official" than a couple quotes to a single source? Perhaps a statement on Oracle's site would help cement their commitment, like this recent one published about Oracle's intent to appeal a legal ruling, which was posted less than 24 hours after that ruling was made. 

Tuesday, July 5, 2016

RAML or The RESTful API Modeling Language

History of RAML

Build APIs from SQL and NoSQL data sources in seconds. Read the Creating REST APIs white paper, brought to you in partnership with CA Technologies.
RAML, or the RESTful API Modeling Language, is a relatively new spec based on the YAML format—making it easily read by both humans and machines. But beyond creating a more easily understood spec (one that could be handed to the documentation team without worry), Uri Sarid, the creator of RAML, wanted to push beyond our current understandings and create a way to model our APIs before even writing one line of code.
"Unfortunately, people are fairly good at short-term design, and usually awful at long-term design." – Roy Fielding, Creator of REST
The challenge with APIs is that they are usually intended to last, hopefully for years. After all, an API requires a substantial investment on the part of the developer, but also a substantial investment on part of the consumer, who relies on it and has to implement it. Uri started thinking about how to solve the challenge of long-term design with APIs in 2009. He wanted a tool that would allow you, in just a few lines, to model (or design) your API and then quickly generate a prototype that developers all around the world could try out and give you feedback. In 2013, his dream became a reality when RAML 0.8 was released.
Since then, interest in RAML has continued grow as companies large and small have realized the benefit of being able to design APIs in a human readable format, see exactly what their API will look like as they design it, and be able to create a live, functional example of the API that developers can make real calls against with just the click of a button.

Selenium

Introduction
• What is Selenium? – Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well. – Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.
Overview
• Which part of Selenium is appropriate for me? • Selenium WebDriver – If you want tocreate robust, browser-based regression automation suites and tests – scale and distribute scripts across many environments – Then you want to use Selenium WebDriver; a collection of language specific bindings to drive a browser -- the way it is meant to be driven. – Selenium WebDriver is the successor of Selenium Remote Control which has been officially deprecated. The Selenium Server (used by both WebDriver and Remote Control) now also includes built-in grid capabilities. • Selenium IDE – If you want tocreate quick bug reproduction scripts – create scripts to aid in automation-aided exploratory testing – Then you want to useSelenium IDE; a Firefox add-on that will do simple record-and-playback of interactions with the browser. •
Why?
• As compared to other automation tools Selenium works on almost all OS and browsers. • Its Open source and can support multiple languages. • Vastly active developer community - backed by Google. • Powerful methods to locate elements (Xpath, CSS, DOM). • Frameworks based on Object oriented programming such as Data Driven, Keyword Driven and Hybrid can be implemented very easily. • Supports open source frameworks integration such as JUnit, TestNG, NUnit etc. • Can run parallel tests using different browsers on different machines which helps reducing the test execution time when working on a large project.
History
• Selenium is one of the most famous open source automation tool in the world. Selenium was originally developed by Jason Huggins in 2004. later on ThroughtWorks developers also join him to develop it further. The name comes from a joke made by Huggins in an email, mocking a competitor named Mercury, saying that you can cure mercury poisoning by taking Selenium supplements. Selenium is Website test automation tool. it also helps you to test the mobile application which has webforms. – Website: http://seleniumhq.org/ – Tool Cost: Free (Open Source) – Object Identification Technique : DOM
Version History
Selenium WebDriver 2.53.0 (this version)
Wednesday, March 16, 2016
Selenium WebDriver 2.52.0 Friday, February 12, 2016 Selenium WebDriver 2.51.0 Friday, February 5, 2016 Selenium WebDriver 2.50.1 Thursday, January 28, 2016 Selenium WebDriver 2.50.0 Wednesday, January 27, 2016 Selenium WebDriver 2.49.0 Tuesday, January 19, 2016 Selenium WebDriver 2.48.2 Wednesday, November 18, 2015 Selenium WebDriver 2.48.1 Wednesday, November 4, 2015 Selenium WebDriver 2.48.0 Wednesday, October 7, 2015 Selenium WebDriver 2.47.0 Wednesday, July 29, 2015
References : https://www.nuget.org/packages/Selenium.WebDriverSelenium supports a broad range of browsers, technologies and platforms.
Selenium Advantages
• Open Source • Big user Base • Robust • support variety of scripting languages. • also supports only webform based mobile applications
Selenium Disadvantages
• It only supports Web and limited mobile applications • More scripting required as it does not have IDE • having limitations on automating custom controls, flash controls. Overall Selenium is unbeatable automation tool for web automation.
Selenium Tool Suite components
1. Selenium IDE: Selenium IDE is Record and playback tool which helps Tester to record and playback the script. It is Firefox plugin and it does not available for other browsers. 2. Selenium RC (Remote Control): Selenium RC is also called as Selenium 1. Selenium RC is older version of Selenium. now a days it is rarely being used. Selenium RC has javascript based which is used to execute the commands on the browsers. 3. Selenium Webdriver: Selenium Webdriver is also called as Selenium 2. this is latest version of Selenium. it has much improved Selenium API. now it uses internet browser’s automation mechanism to execute the commands on browsers. 4. Selenium Grid: Selenium Grid provides the test execution mechanism to execute the test cases on different machines.
Selenium Tool Suite components
Brief Introduction to Selenium tools

Selenium Core Selenium IDE (Selenium Integrated Development Environment) Selenium RC (Selenium Remote Control) Selenium Grid Selenium WebDriver Selenium 3
Selenium Core
• Selenium is a result of continuous efforts by an engineer at ThoughtWorks, named as Jason Huggins. Being responsible for the testing of an internal Time and Expenses application, he realized the need for an automation testing tool so as to get rid of repetitive manual tasks without compromising with the quality and accuracy. • As a result, he built a JavaScript program, named as “JavaScriptTestRunner” in early 2004 that could automatically control the browser’s actions which seemed very much similar to that of a user communicating with the browser. • Henceforth, Jason started demoing the tool to the vast audience. Eventually the discussions were laid out to categorize this tool in the open source category as well as its potential to grow as a re-usable testing framework for other web based applications. • The tool was later on acclaimed with the name “Selenium Core”.


Selenium IDE (Selenium Integrated Development Environment) 

• Selenium IDE was developed by Shinya Kasatani. While studying Selenium Core, he realized that this JavaScript code can be extended to create an integrated development environment (IDE) which can be plugged into Mozilla Firefox. This IDE was capable of recording and playing back the user actions on a Firefox instance to which it was plugged-in. Later on Selenium IDE became a part of Selenium Package in the year 2006. The tool turned out a great value and potential to the community. • Selenium IDE is the simplest and easiest of all the tools within the Selenium Package. Its record and playback feature makes it exceptionally easy to learn with minimal acquaintances to any programming language. With several advantages, a few disadvantages accompanied Selenium IDE, thus making it inappropriate to be used in cases of more advanced test scripts.


Advantages and disadvantages of Selenium IDE


Note : The disadvantages of IDE are in reality not disadvantages of selenium, rather just limitations to what IDE could achieve. These limitations can be overcome by using Selenium RC or WebDriver.
Selenium RC (Selenium Remote Control) • Selenium RC is a tool which is written in java that allows a user to construct test scripts for a web based application in which ever programming language he/she chooses. Selenium RC came as result to overcome various disadvantages incurred by Selenium IDE or Core. • Loopholes and restrictions which were imposed while using Selenium Core made it difficult for the user to leverage the benefits of the tool to its totality. Thus it made the testing process a cumbersome and a far reaching task.

Selenium RC -Problem of same origin policy • One of the crucial restrictions was same origin policy. • Problem of same origin policy: – The problem of same origin policy disallows to access the DOM of a document from an origin that is different from the origin we are trying to access the document. – Origin is a sequential combination of scheme, host and port of the URL. For example, for a URL http://www.seleniumhq.org/projects/, the origin is a combination of http, seleniumhq.org, 80 correspondingly. – Thus the Selenium Core (JavaScript Program) cannot access the elements from an origin that is different from where it was launched.
Selenium RC -Problem of same origin policy • For Example, if I have launched the JavaScript Program from “http://www.seleniumhq.org/”, then I would be able to access the pages within the same domain such as “http://www.seleniumhq.org/projects/” or “http://www.seleniumhq.org/download/”. The other domains like google.com, yahoo.com would no more be accessible. • Thus, to test the application using Selenium Core, one has to install the entire application on the Selenium Core as well as web server to overcome the problem of same origin policy.
Selenium RC -Problem of same origin policySo, In order to govern the same origin policy without the need of making a separate copy of Application under test on the Selenium Core, Selenium Remote Control was introduced. While Jason Huggins was demoing Selenium, another fellow colleague at ThoughtWorks named Paul Hammant suggested a work around of same origin policy and a tool that can be wired up with a programming language of our choice. Thus Selenium RC came into existence.
Selenium RC supports a wide range of browsers and platforms.
Selenium RC Workflow Description• User creates test scripts in a desired programming language. • For every programming language, there is a designated client library. • Client library deports the test commands to the selenium server. • Selenium server deciphers and converts the test commands into JavaScript commands and sends them to the browser. • Browser executes the commands using selenium core and sends results back to the selenium server • Selenium server delivers the test results to the client library. • There are a few pre-requisites to be in place before creating Selenium RC scripts: – A Programming Language – Java, C#, Python etc. – An Integrated Development Environment –Eclipse, Netbeans etc. – A Testing Framework (optional) – JUnit, TestNG etc. – And Selenium RC setup off courseAdvantages and disadvantages of selenium RC
Selenium Grid

• With selenium RC, life of a tester has always been positive and favorable until the emerging trends raised a demand to execute same or different test scripts on multiple platforms and browsers concurrently so as to achieve distributed test execution, testing under different environments and saving execution time remarkably. Thus, catering these requirements selenium grid was brought into the picture. • Selenium Grid was introduced by Pat Lightbody in order to address the need for executing the test suites on multiple platforms simultaneously.
Selenium WebDriver• Selenium WebDriver was created by yet another engineer at ThoughtWorks named as Simon Stewart in the year 2006. WebDriver is also a web-based testing tool with a subtle difference with Selenium RC. Since, the tool was built on the fundamental where an isolated client was created for each of the web browser; no JavaScript Heavy lifting was required. This led to a compatibility analysis between Selenium RC and WebDriver. As a result a more powerful automated testing tool was developed called Selenium 2. • WebDriver is clean and a purely object oriented framework. It utilizes the browser’s native compatibility to automation without using any peripheral entity. With the increasing demand it has gained a large popularity and user base.
Advantages and disadvantages of Selenium WebDriverSelenium 3
• Selenium 3 is an advance version of Selenium 2. It is a tool focused for automation of mobile and web applications. Stating that it supports mobile testing, we mean to say that the WebDriver API has been extended to address the needs of mobile application testing. The tool is expected to be launched soon in the market.
Environment and Technology StackSupported Browsers Supported Programming Languages Supported Operating Systems Supported Testing Frameworks
Supported Browsers• With the advent and addition of each new tool in the selenium suite, environments and technologies became more compatible. Here is an exhaustive list of environments and technologies supported by selenium tool set. • Supported BrowsersSupported Programming LanguagesSupported Operating SystemsSupported Testing Frameworks
How to Choose the Right Selenium Tool for Your Need Tool Why Choose ?
Selenium IDE•To learn about concepts on automated testing and Selenium, including: •Selenese commands such as type, open, clickAndWait, assert, verify, etc. •Locators such as id, name, xpath, css selector, etc. •Executing customized JavaScript code using runScript •Exporting test cases in various formats. •To create tests with little or no prior knowledge in programming. •To create simple test cases and test suites that you can export later to RC or WebDriver. •To test a web application against Firefox only.
Selenium RC
•To design a test using a more expressive language than Selenese •To run your test against different browsers (except HtmlUnit) on different operating systems. •To deploy your tests across multiple environments using Selenium Grid. •To test your application against a new browser that supports JavaScript. •To test web applications with complex AJAX-based scenarios.
WebDriver•To use a certain programming language in designing your test case. •To test applications that are rich in AJAX-based functionalities. •To execute tests on the HtmlUnit browser. •To create customized test results.
Selenium Grid
•To run your Selenium RC scripts in multiple browsers and operating systems simultaneously. •To run a huge test suite, that need to complete in soonest time possible.
A Comparison between Selenium and QTP • Quick Test Professional(QTP) is a proprietary automated testing tool previously owned by the companyMercury Interactive before it was acquired by Hewlett-Packard in 2006. The Selenium Tool Suite has many advantages over QTP (as of version 11) as detailed in next slide
A Comparison between Selenium and QTP • Advantages of Selenium over QTPSelenium QTP Open source, free to use, and free of charge. Commercial. Highly extensible Limited add-onsCan run tests across different browsers
Can only run tests in Firefox , Internet Explorerand ChromeSupports various operating systems Can only be used in WindowsSupports mobile devicesSupports mobile device using 3rd party softwareCan execute tests while the browser is minimizedNeeds to have the application under test to be visible on the desktopCan execute tests in parallel.
Can only execute in parallel but using Quality Center which is again a paid product.
A Comparison between Selenium and QTP • Advantages of QTP over Selenium
QTP Selenium Can test both web and desktop applications Can only test web applications
Comes with a built-in object repository Has no built-in object repositoryAutomates faster than Seleniumbecause it is a fully featured IDE.
Automates at a slower rate because it does not have a native IDE and only third party IDE can be used for development
Data-driven testing is easier to perform because it has built-in global and local data tables.
Data-driven testing is more cumbersome since you have to rely on the programming language's capabilities for setting values for your test dataCan access controls within the browser(such as the Favorites bar, Address bar, Back and Forward buttons, etc.)
Cannot access elements outside of the web application under test
Provides professional customer support No official user support is being offered. Has native capability to export test datainto external formats Has no native capability to export runtime data onto external formatsParameterization Support is in built
Parameterization can be done via programming but is difficult to implement.
Test Reports are generated automatically No native support to generate test /bug reports.
A Comparison between Selenium and QTP• Though clearly, QTP has more advanced capabilities, Selenium outweighs QTP in three main areas: • Cost(because Selenium is completely free) • Flexibility(because of a number of programming languages, browsers, and platforms it can support) • Parallel testing(something that QTP is capable of but only with use of Quality Center)
Summary• The entire Selenium Tool Suite is comprised of four components: • Selenium IDE, a Firefox add-on that you can only use in creating relatively simple test cases and test suites. • Selenium Remote Control, also known as Selenium 1, which is the first Selenium tool that allowed users to use programming languages in creating complex tests. • WebDriver, the newer breakthrough that allows your test scripts to communicate directly to the browser, thereby controlling it from the OS level. • Selenium Gridis also a tool that is used with Selenium RC to execute parallel tests across different browsers and operating systems. • Selenium RC and WebDriver was merged to form Selenium 2. • Selenium is more advantageous than QTP in terms of costs and flexibility. It also allows you to run tests in parallel, unlike in QTP where you are only allowed to run tests sequentially.