Loading...

Follow Ultimate QA - Nikolay Advolodkin on Feedspot

Continue with Google
Continue with Facebook
or

Valid

Confused about all of the different Selenium Webdriver Timeouts? This post will help you to understand the difference between an Explicit and Implicit Wait.

Which should you use and why?

Based on recommendations from Selenium community…

You should only use an Explicit Wait

I would just recommend that you take a read of this comment from Jim Evans, the C# Selenium bindings maintainer.

Don’t mix implicit and explicit waits. Part of the problem is that implicit waits are often (but may not always be!) implemented on the “remote” side of the WebDriver system. That means they’re “baked in” to IEDriverServer.exe, chromedriver.exe, the WebDriver Firefox extension that gets installed into the anonymous Firefox profile, and the Java remote WebDriver server (selenium-server-standalone.jar).

Explicit waits are implemented exclusively in the “local” language bindings. Things get much more complicated when using RemoteWebDriver, because you could be using both the local and remote sides of the system multiple times.

This is how that would work: local code -> Java remote server -> local Java language bindings on the remote server -> “remote” component like the Firefox extension, chromedriver.exe or IEDriverServer.exe. It’s even more complex in the grid case, since there could be other hops in between.

Thus, when you try to mix implicit and explicit waits, you’ve strayed into “undefined behavior”. You might be able to figure out what the rules of that behavior are, but they’ll be subject to change as the implementation details of the drivers change. So don’t do it.

You shouldn’t be experiencing “hangs” when an element can’t be found if you’re not using implicit waits. The driver should throw a NoSuchElementException immediately.

So, that’s reason why I never use an implicit wait and I recommend my students why not to use it.

  • If you use an Explicit Wait even once and you follow Jim’s recommendation, it means that you can’t use an ImplicitWait any more.
  • Otherwise, you will be mixing waits.
  • Therefore, you shouldn’t ever use an Implicit Wait. I’ve never needed to use it in my test automation.
Case Studies

2000% Stability Improvement From Only Using Explicit Waits

I worked with one client that had drastic instability in their automation with 30-40 failures out of every 100 tests.

Once, I helped them to remove ALL implicit waits from their code and only use Explicit waits, their test stability improved to ~2 tests failing out of 100.

If you want to drastically stabilize your #test #automation by up to 2000%, simply make sure that you are not mixing implicit and explicit waits in #Selenium. Use explicit waits only. #development
Click To Tweet
Difference In Definition Implicit Wait

  • Tell WebDriver to poll the DOM for a certain amount of time. This is literally using the ImplicitWait property that Selenium WebDriver offers.
  • Waits for an element to exist in the DOM, that’s it. Cannot tell if an element is hidden for example.
  • Only needs to be configured once
  • Less flexible
Explicit Wait
  • This is the code that you write to wait for a certain condition to occur before proceeding. You can use the WebDriverWait class, Thread.Sleep, or write your own from scratch.
  • Recommended way to wait in your tests
  • The easiest way to use this is through the WebDriverWait class that Selenium provides us
  • Selenium will try an action repeatedly (is element visible, is element present, is button clickable…) until the action can be accomplished or an exception is thrown
Differences in Code

Implicit Wait

Explicit Wait

Differences in Default Wait Time

Implicit Default Timeout (sec) – 0

Explicit Default Timeout (sec) – .5

Difference In Exceptions Thrown Implicit Wait
  • Throws a NoSuchElementException when the element is not present in the DOM
  • Throws a ElementNotVisibleException when element is present in the DOM, however, it is hidden and cannot be interacted with
Explicit Wait
  • Throws a WebDriverTimeoutException, depending on your expected condition
Disadvantages of each Implicit Wait
  • An implicit wait only works with elements that exist on the page. If the element is hidden in the DOM, an implicit wait will never work. So you will be forced to use an explicit wait to synchronize on that element. An in depth example is here. Also, an element may be present in the DOM, but not fully loaded. ImplicitWait will still return because that element is present.
  • the implicit wait sends a message to the “remote side” of the selenium WebDriver. The remote side of the selenium WebDriver is the part of selenium which is actually controlling the browser. What does the remote side do with the message? “It depends”. It depends on the operating system and on the browser and on the version of selenium. As far as I can tell there is no guarantee about the actual behaviour of a specific implementation. Meaning, we have no clue about how the implicit wait will behave (StackOverFlow)
Explicit Wait
  • You need to use more lines of code to create an explicit wait
Food for thought

One possibly useful use case of an ImplicitWait is to use it with running on a service like Sauce Labs or Browser Stack. Because Implicit Wait doesn’t use the network to execute commands, it might actually be a performance enhancement and flakiness removal measure. Since an ImplicitWait forces the driver to poll rather than sending HTTP requests from the code to the driver, this can, in theory, reduce latency.

This HAS NOT been proven or documented anywhere. However, this is a theory that is floating around between myself and some other Solution Architects. We need data to back up this theory!

But if you’re willing to try it, give it a shot and let me know in the comments below if this helps you with your automation in the cloud.

I learned the difference between and explicit and an implicit wait from #selenium. I finally know when to use one over the other!
Click To Tweet

The post The difference between Explicit and Implicit Waits in Selenium WebDriver appeared first on Ultimate QA.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
What is webdriverIO? WebdriverIO Test Runner

This is the most popular way of using webdriverIO.

The test runner is basically a framework that makes test automation much easier. For example, here are some of the inherent advantages of using the test runner:

  • Extra hooks: Hooks will allow you the capability to perform actions before and after execution of tests.
  • Default async/await usage: WebDriver commands are asynchhronous by nature. As a result, every command will require an await before it. Which can be a little repetitive and annoying. The test runner handles this for you so that you don’t need to worry about it.
  • Suites: Suites allow you to separate different sections of your test suite so that you can run them individually.
  • Parallel test runs: Parallelization is the most powerful way to speed up your suite execution. Besides that, parallelization is mandatory to any test automation program.
  • Automatic session deletion: Normally you have to do something like this in your tests await browser.deleteSession(); But, the test runner takes care of that part for us.
Tips + Tricks
  • If you are constantly having permission issues installing stuff, run npm config set unsafe-perm true that will put you into an administrator shell through which you can run all of your installation commands.
WebdriverIO test runner tutorial

This is the one the version that you want to use. It comes with everything you need out of the box. There’s also webdriverio standalone that you can use but I don’t feel like it has much use.

How to get started

Official docs are here

1.Create a new directory and navigate to that directory

mkdir wdio-testrunner && cd wdio-testrunner

2.Initialize a new NPM project with npm init -y . This will create a package.json file

If you don’t do this, when you go to do npm install no packages will actually be installed.

3. Install the command line interface npm install @wdio/cli. All the official WebdriverIO packages are namespaced under the @wdio scope

If you encounter any permissions errors here, you can try:

sudo npm i --save-dev @wdio/cli --unsafe-perm=true --allow-root

Or just set this globally for npm and it will stop complaining:

npm config set unsafe-perm true

The CLI tool is a wrapper around the main webdriverIO functionality, we will work through the CLI.

Since @wdio/cli is a command-line utility, it’s setup to install to a special .bin folder inside our node_modules directory. This gives us two ways to run the utility:
$ ./node_modules/.bin/wdio
or
$ npx wdio

4. Let’s configure webdriverIO using npx wdio

Answer the questions
  1. Where should your tests be launched? Enter
  2. Shall I install the runner plugin for you? Y
  3. Where is your automation backend located? For now, our tests will execute on our local machine through our selenium server
  4. Which framework do you want to use? mocha
  5. Shall I install the framework adapter for you? Y . This will install our framework that we would like to use.
  6. Do you want to run WebdriverIO commands synchronous or asynchronous? sync . This will make sure that you don’t have to keep using async with every command
  7. Where are your test specs located? (./test/specs/*/.js)? Enter
  8. Which reporter do you want to use? spec . We will keep things simple for now.
  9. Do you want to add a service to your test setup? selenium-standalone . Make sure that you press the Space key to select one or more options. Press Enter after you are done.
  10. Level of logging verbosity: Info
  11. What is the base url? Enter the base url of your website

I’d like to bring to your attention that the ** and * in the path is called a Glob pattern. That’s a convention used to define where multiple files are at.
The ** section says to look in all the sub-folders for files, if we later organize our tests by feature (say we add a login or checkout folder) WebdriverIO will know to look in those subfolders as well as the main test/specs folder.
The * portion in *.js matches any file that ends with a .js extension. It will match test.js and login.js but not test.txt or just login.

How to run a webdriverIO test

1.Create a new folder for our tests mkdir -p ./test/specs

First, when we setup the webdriverIO test runner, we specified the location of all of tests in the wdio.conf.js. So, any tests that we put inside the spec folder will be executed. This is the configuration in the file.

Now we have the folder for our tests. Let’s actually add a test:

2. Using command line, create a new file touch ./test/specs/example.js

Where all of the test files should live

3. Add this code to the example.js file

4. Run the test using npx wdio or ./node_modules/.bin/wdio

Note: Make sure that you have the appropriate browser installed. In the previous examples, we installed Chrome. Hence, if that’s what you have then set that in the wdio.conf.js because the default is Firefox.

Set browser to chrome WebdriverIO QuickStart
  1. Clone this repo
  2. Install dependencies using npm install
  3. Run tests npx wdio
Cool WebdriverIO features
  • Interactions with elements with only a single command: This means that to click an element, you simple have to use this command browser.click('element locator'). This will also find the element and then click it if it’s found. This is actually two web requests for a single method call.
Command line options Dynamic URLs

You can dynamically set your application URL through command line.

Execute the tests SERVER=prod ./node_modules/.bin/wdio --logLevel=trace

NPM scripts

NPM scripts documentation

Using these scripts, we can make testing easier.

For example, we can update package.json

To look like this:

And now we can run the tests like this npm test wdio

If you want to add command line parameters to the scripts, you need to prefix them with -- like this npm test -- --logLevel=info

However, if you want to change environment variables, do just like before:

SERVER=prod npm test -- --logLevel=trace

WebdriverIO standalone tutorial How to install WebdriverIO
  1. Make a directory mkdir wdio-standalone
  2. Navigate to the new directory cd wdio-standalone
  3. Initialize the project as an NPM project withnpm init -y. This will create a package.json file.
  4. Install WebdriverIO with npm install webdriverio . This will install all of the packages that are relevant for WebdriverIO. Note: Installing WebdriverIO via the command line doesn’t give you all of the NPM packages that you need. We do get a Node.js module.
  5. Create a new file with touch test.js
  6. Open the file and let’s add some code to it

Next, we’ll need to install Selenium Server…

How to install selenium-standalone

Pre-requisites:

1. Run command sudo npm i -g selenium-standalone

2. Install the resources from the server sudo selenium-standalone install

3. To start the server, you can run selenium-standalone start. Make sure to do this in a separate Terminal window

You know that you succeeded if you can hit this URL: http://localhost:4444/wd : and see something like this.

How to run webdriverIO test with selenium-standalone?

1. In your terminal with wdio-standalone installed, run node test.js. This will tell Node.js to run the test.js file.

If successful, you will see a chrome browser come up quickly and you will see some commands logged that look like this

How to run webdriverIO with chromedriver?

Chromedriver uses port 9515 to listen for commands to come through. That’s a bit different from Selenium server that runs on port 4444.

This is the default configuration that runs on selenium server.

To update it to use chromedriver, change the configuration to this:

Now, you will want to install and run chromedriver below…

How to install and run chromedriver

1.Open terminal and run npm install -g chromedriver

Note: You might run into some errors here like Missing write access or Chromedriver installation failed. Follow those links for solutions.

2. Run chromedriver in a separate terminal window by running chromedriver command. This is what success looks like:

You can also hit http://localhost:9515/ and make sure that you get back a response. That will tell you if chromedriver is running or not.

How to run a webdriverIO test on chromedriver?

1.Once you have chromedriver running with the chromedriver command

2.Execute node test.js to run your tests on Chrome

Debugging WebdriverIO tests

You can add a browser.debug(); command anywhere in your test code and the execution will stop there.

At some point, the debug point will time out so that our test isn’t hanging for too long. In debugging of course, we want to have this timeout be longer…

We can change that and it’s based on the testing framework that you are using.

Mocha API

Here’s the Mocha API

We can update the timeout either using the mocha.opts file or via command line.

For WebriverIO, the settings are actually in the wdio.conf.js file. So we can just change them there. The timeout setting is in ms.

You can imagine that it’s a bit annoying to keep changing these values. Especially, when you forget to change it back in production, potentially leaving your tests to hang.

There’s documentation on how to do this dynamically from WebdriverIO here.

Here’s an example of how to do this:

Now you can set the timeout using command line and use the longer option DEBUG=true npx wdio

My questions
  • Changing to this import { notStrictEqual } from 'assert'; from this const assert = require('assert'); doesn’t work for some reason when I run npx test.
  • How to download some source code and start working with it.
Learn WebdriverIO Course

Pre-requisites

  • Install NodeJS

1. Clone this repo

2. Navigate to the directory of the repo cd webdriver-io-course-content

3. Run npm install to download all of the dependencies

4. Run npm start which will start the application on your local environment

5. Go to one of the URLs to see the website running

Common errors Missing write access to /usr/local/lib/node_modules…
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
 npm ERR! path /usr/local/lib/node_modules
 npm ERR! code EACCES
 npm ERR! errno -13
 npm ERR! syscall access
 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
 npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
 npm ERR!   stack:
 npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
 npm ERR!   errno: -13,
 npm ERR!   code: 'EACCES',
 npm ERR!   syscall: 'access',
 npm ERR!   path: '/usr/local/lib/node_modules' }
 npm ERR! 
 npm ERR! The operation was rejected by your operating system.
 npm ERR! It is likely you do not have the permissions to access this file as the current user
 npm ERR! 
 npm ERR! If you believe this might be a permissions issue, please double-check the
 npm ERR! permissions of the file and its containing directories, or try running
 npm ERR! the command again as root/Administrator (though this is not recommended).
 npm ERR! A complete log of this run can be found in:
 npm ERR!     /Users/nikolay/.npm/_logs/2019-04-14T14_28_32_628Z-debug.log
The solution

This is an issue with write permissions to your disk. If you see these kinds of errors, simply run the command with sudo.

sudo npm install -g chromedriver

ChromeDriver installation failed { Error: EACCES: permission denied …
ChromeDriver installation failed { Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/chromedriver/lib/chromedriver'
     at Object.mkdirSync (fs.js:753:3)
     at /usr/local/lib/node_modules/chromedriver/install.js:282:10
   errno: -13,
   syscall: 'mkdir',
   code: 'EACCES',
   path: '/usr/local/lib/node_modules/chromedriver/lib/chromedriver' }
 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! chromedriver@2.46.0 install: node install.js
 npm ERR! Exit status 1
 npm ERR! 
 npm ERR! Failed at the chromedriver@2.46.0 install script.
 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
 npm ERR! A complete log of this run can be found in:
 npm ERR!     /Users/nikolay/.npm/_logs/2019-04-14T14_31_21_148Z-debug.log
The solution

Run this command instead that I got from here:

sudo npm i -g chromedriver --unsafe-perm=true --allow-root

Resources
  1. Clone
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Selenium 4.0 that is W3C compliant is coming, are you ready?

We still need to do a lot of scrambling to get all of the correct code together.

But I will do my best to guide you through all of the problems that you might face with the .NET bindings

It gets better:

I will continue to update this post with the latest research and code samples so that you are ready when it comes time to make the switch.

Code and release notes

If you want a bunch of the code samples that I created, those are here

Also, the full release notes from Jim Evans are here

If you want to try out the 4.0.0-alpha01 version of Selenium, get it from Nuget by running this command Selenium.WebDriver -Version 4.0.0-alpha01

Deprecation of DesiredCapabilities

If you want to work with a RemoteWebDriver to use the grid or a service like Sauce Labs, Browser Stack, Appium…

DesiredCapabilities are gone.

You have to use browser specific capabilities like ChromeOptions, SafariOptions and so on…

Here are some code samples of new, working capabilities:

options.AddAdditionalCapability deprecated

This is no longer valid:

options.AddAdditionalCapability("sauce:options", sauceOptions);
chromeOptions.AddAdditionalCapability("sauce:options", sauceOptions, true);

Replace with:

chromeOptions.AddAdditionalOption("sauce:options", sauceOptions);
ExpectedConditions and PageFactory moved to different package

This should come as no surprise since this has been known since WebDriver 3.11. Regardless, I tackle these issues here.

Working with ChromeOptions

Here’s a working code example using ChromeOptions:

AcceptInsecureCertificates in Options

Don’t use AcceptInsecureCertificates on IE, Edge, Safari as those browsers do not allow insecure certificates.

SafariOptions safariOptions = new SafariOptions
{
    BrowserVersion = "12.0",
    PlatformName = "macOS 10.13"
    //AcceptInsecureCertificates = true Don't use this as Safari doesn't support Insecure certs
};
Added support for opening new browser windows

Jim Evans summarized it best:

The method creates a new browser tab/window and switches to it. As an argument, the method takes a type hint to indicate what type of browser context the user wants (a tab or a window).

Example usage:
driver.SwitchTo().NewWindow(WindowType.Tab);

Note carefully, however, this type hint is only a suggestion. If a browser
driver does not support creating new top-level browsers of the type desired by the user, it will still create the new top-level browser using whatever type it does support. This is perfectly compliant with the specification language for this command. As a concrete example, at the time of this commit, executing the above sample code against the IE driver will create a new top-level browser context, but as a window, not a tab, in spite of the fact that a new tab was explicitly requested. Even though the browser itself supports creation of new tabs, the driver does not. This will not be considered a valid bug, and issue reports claiming it is so will be summarily closed, possibly without comment.

Jim Evans, https://github.com/SeleniumHQ/selenium/blob/master/dotnet/CHANGELOG

The post The Latest Changes To Selenium WebDriver 4.0 And How to Fix Your Broken Code [2019]? appeared first on Ultimate QA.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Basic react concepts

Components

  • Are similar to functions where you provide input and get output back. Input is props, state. Output is the UI.
  • You do not invoke components, rather you use them like this:
<Component />
  • Can manage a private state

Components should be named with a Capital letter because otherwise React will think that you are referring to HTML elements.

Props are immutable, meaning they cannot be changed

Examples
function Hello() {
	return <div>Hello React!</div>;
}

ReactDOM.render(
  <Hello />, 
  document.getElementById('mountNode'),
);

We have a simple react function component that has no state.

Using the ReactDOM.render() function, we render the content into the DOM. The first argument of the render method is the component passed in like an HTML element.

The second argument is the DOM element where in the DOM we want that component to appear. This is the entry point of React.

return <div>Hello React!</div>;

This line above is not valid JavaScript, that is JSX. Behind the scenes, Babel, the compiler really does this:

"use strict";
//Arguments: element to be created, any attributes that the element has, child of that element
React.createElement("div", null, "Hello React!");

Even this code below is converting this JSX:

ReactDOM.render(
  <Hello />, 

Into this React command:

React.createElement(Hello, null)
useState()

useState is a hook in the React world.

const [currentStateValue, functionToSetNewStateValue] = useState(initialSTateValue)
function Button() {
	const [counter, setCounter] = useState(5);
	return <button onClick={() => setCounter(counter*2)}>{counter}</button>;
}

What is happening with the code above?

First, we have an array that gets the current state of the Component through the useState() method, which is initialized to 5. The array has a getter called counter and a setter called setCounter.

	return <button onClick={() => setCounter(counter*2)}>{counter}</button>;

This second part says that we have a button element that performs some operation on a click, the onClick(). The operation that it defines is set in the {}. So in our case, there is an Arrow Function that’s called that will increment the current counter by 2, and then that value will be passed to setCounter.

The {counter} means that the current value of inside of the counter function will be displayed. Notice how the function isn’t called like counter(), but instead gets a reference to it like counter. The counter value will be displayed in the button.

The cool thing to notice is that we don’t actually do any manipulations of the DOM, React does that for us. All we do is set the action that happens on the click and React automatically updates the state of the DOM.

Best practices

function Button() {
	const [counter, setCounter] = useState(0);
	return <button onClick={() => setCounter(counter+1)}>{counter}</button>;
}

The long return statements are obviously hard to read, we can clean up our code to look like this. Also, notice how the return statement has () and not {} because we aren’t returning an object:

function Button() {
	const [counter, setCounter] = useState(0);
//this function below makes the code more readable and must be declared in the Button component so that it has access to all of the variables
const handleClick = () => setCounter(counter+1);
	return (
    <button onClick={handleClick}>
      {counter}
    </button>
  );
}
How to render multiple components
ReactDOM.render(
  <React.Fragment>
    <Button />
    <Display />
  </React.Fragment>, 
  document.getElementById('mountNode'),
);

React.Fragment is a special react keyword that tells React that you will have multiple elements inside of a single element. Below is an ever easier way to do React.Fragment using <>

ReactDOM.render(
  <>
    <Button />
    <Display />
  </>, 
  document.getElementById('mountNode'),
);
Useful tools

The post Getting Started with React appeared first on Ultimate QA.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

We need a place to practice our test automation skills, wouldn’t you agree?

Where do you go when you need to learn how to deal with AJAX, Angular, Kendo and other dynamic elements?

Hence, I compiled a list of my favorite websites to practice test automation:

  • SauceDemo.com
  • Ultimate QA Practice Site
  • ParaBank Bank Site
  • Telerik Multi Language Demo Site
  • Awful Valentine
  • Dave Haeffner’s Practice Site
  • PHP Travels
  • Mercury Tours
  • E-commerce Clothing Site
  • Demoqa
  • Compendiumdev.co.uk
  • Address Book
  • ACME Demo Banking

This list contains websites that provide some unique attributes that other websites don’t have. As a result, you can pretty much combine all of them together to have a complete profile of different types of automation skills.

SauceDemo E-Commerce

Skills Learned: Test data injection, handling automation failures

This is probably the best demo site that I have seen for UI test automation. This website is an e-commerce store that has several cool attributes.

First, it has a normal, working user that you can use for all of your test automation scenarios.

Next, you can use the problem_user to test the same exact scenarios that worked for the standard_user. However, the problem_user, will have tons of problems with the web app. As a result, a bunch of your tests should fail, for the correct reasons.

Ultimate QA HTML Elements

A free place to practice some scenarios like:

– Testing a large complicated page

– Work with simple HTML elements like buttons

– Fill out forms

– Automate an application that evolves over time

ParaBank Banking Software

Skills Learned: UI + Web Services automation

This is a banking website that allows for automation through the UI and through the Web Services (REST and SOAP). This is hugely beneficial because it will allow you to think of your automation in terms of the automation pyramid.

This means that you can learn how to move as much functionality as possible to the API layer and then do the rest of the automation through the UI layer. This is the ultimate approach to automation and having a website like this is amazing for practice.

Telerik Multi Language Demo Site

I don’t know if this website was meant to be a demo automation site. However, I do know that it is fantastic! It has all sorts of controls to play with. For example:

And so much more. This might be a one stop shop for all of your HTML elements and controls.

Awful Valentine

Another free website that I got from a book I read called Selenium Design Patterns. This website is a simulator of an online store where you can purchase different kinds of items. You can try to automate items such as:

– Slow AJAX

– Slow animation

– Third party links

– Credit card transactions

– Online store checkout scenarios

Dave Haeffner’s Practice Site

Dave designed an excellent place to practice different kinds of test automation scenarios. Some of the scenarios that you can try to automate include:

– A/B Testing

– Basic Auth

– File Upload

– Challenging DOM

– iFrames

– Slow connections

– Dynamic content

– Hovers

– Redirect links

PHP Travels

This is an excellent demo travel site that you can use to practice your test automation. They have a front end and a back end for you to automate. This one is a bit more fancy than the website that you will see below.

Mercury Tours

This is a demo travel site that you can use to practice your test automation. They have a front end and a back end for you to automate.

Sample E-Commerce Site

This is really a nice fake e-commerce site to practice test automation. If you have a project where you need to practice different flows for online stores, this is the website you want. You can practice

– Adding items to the cart

– Checking out

– Validating that items have been added

Demoqa

This is a neat little website with simple elements to practice test automation with. It has:

– Draggable elements

– Droppable elements

– Selectable elements

– Sortable elements

– Much more

Compendiumdev.co.uk

– Drag and drop elements

– Draw on a canvas

Fake Online Clothing Store

This is a neat online clothing store for performance apparel called Luma. Here you can practice the following skills:

– Adding items to a cart

– Searching for items in the store

– Performing the checkout process

Fake address book app

This is an app that I recently learned about from one of my coworkers. This is a sample Address Book app. Some things that you can practice here are basic CRUD operations for addresses.

ACME Banking

Skills Learned: Very simple UI interactions

This is a demo banking website from Applitools. You can login to the app simply by pressing the login button and not even entering any credentials.

It doesn’t seem to do much though besides being able to login. None of the buttons seem to work. Only the UI seems to get refreshed with a few of the buttons.

Conclusions

Did I miss some sample sites? What other practice sites or apps would you like to see listed? Let me know below so that I can expand this list.

The post Complete List of Awesome Websites to Practice Automation Testing appeared first on Ultimate QA.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Best Programming Languages to Learn: Top 15 (2019) 

While hundreds of programming languages exist, there are some that developers all over the world trust and use repeatedly.

In this complete guide, we’ll tell you the best programming languages to learn in 2019. As a result, you will be left with valuable information to make an informed decision about which language to start learning.

We have ranked the programming languages using a combination of multiple factors:

#1. Java

Java Rating

Java programming language has proved its mettle for over two decades.

20 years is a good enough time for any programming language to evolve and be useful in a variety of development environments.

Java is no different – it’s easy to learn with tons of resources available online.

Moreover, Java being an object-oriented language, its concepts are relatable and easier to understand.

The love for Java in the programming world is also attributed to the fact that Java is open source and is a platform independent language that works across different operating system environments. The percentage of active Java users across the world has improved by 14.01%.

The language being stable and scalable is found on a wide variety of device types – ranging from mobiles and desktops to large-scale applications.

The same can be talked about the community of Java programmers which is more than 10 million in all parts of the world.

This is the reason Java is also gaining importance in developing applications for the Internet of Things (IoT).

Java didn’t gain this success overnight as it had to evolve over decades to reach the level of popularity and stability that it is known for today.

Moreover, Java’s Rich API is one of the biggest reasons that led to the success of this language.

Along with Rich API, Java’s success can also be attributed to powerful development tools such as Eclipse and Netbeans that made programming in Java language a pleasant experience for the developer.

In 2019, apps are going to be even bigger than what they are today. The demand for Java programmers is going to be sky high.

However, Java job postings decreased by 6000 in 2018 because of the growing popularity of Python.

 Pros and ConsPros
  • Easy to learn

Being a programming language that has remained a go-to language for programmers for more than two decades.

There are hundreds of online resources that allow you to learn Java from the comfort of your home.

Moreover, Java is less complicated than other programming languages such as C and C++, making it the language of choice for millions of developers worldwide.

  • Platform-independent

The beauty of Java is that it is platform-independent.  

It is possible for developers to maneuver their code from one operating system and development environment to another.

  • Java

Java has always focused on security, compiler and runtime environments.

This is the reason Java is used to create a range of programs where security is desired.

  • Multithreaded

Java reduces the effort required to create complex programs.

The multithreaded potential of this programming language lets you create programs that can multitask at different points within the program.

Cons
  • Memory consuming

One of the biggest drawbacks of Java programming language is that its memory consuming.

It is a little slow when compared to other natively compiled languages such as C or C++.

  • Not suitable to GUI Apps

Graphical user interface applications that are programmed in Java using the Swing toolkit are completely different from others written in more native languages.

 TIOBE Index Rating

Java is ranked #1 and is growing according to the TIOBE index.

 PYPL Index Rating

Java is dropping according to the PYPL index.

It is now ranked #2.

 Salary Ranges

Salary reports from the StackOverflow developer survey of 2018 show that Java is associated with a salary of $100,000 in the USA.

$100,000

$-

 Stack Overflow Trends

Java has been losing popularity on StackOverflow consistently for over 4 years.

GitHub Octoverse rating

Java is the 2nd most popular language on Github.

How to learn Java?

Many online resources allow you to learn Java.

Pluralsight has some of the best programming courses in the world that I have ever taken.

Check out these options below and if you want you can do a Free 10-Day Trial.

#2. JavaScript

JavaScript Rating

 You’re browsing this page on a web browser. This means that you’re already in the world of JavaScript.

More than 1 million websites on the internet run on JavaScript. That’s how powerful and popular this language is.

JavaScript, which is often called the de facto language of the web, works on an astonishingly large number of devices including the IoT.

Just because the language is super popular, its jobs are in abundance.

That is another reason that it ranks among the list of the most popular programming languages to learn in 2019.

JavaScript is versatile – your browser already has it.

You can use it to do all sorts of stuff in your browser, without going through the tedious processes of setting up runtime environments and code compilers.

It is also the most popular programming language of the world making it any programmer’s choice.

What made JavaScript so popular was the fact that it made its way into most web browsers even when it wasn’t this popular.

 Pros and ConsPros
  • It’s actually everywhere

There is a reason why JavaScript is christened to be the de facto language of the web.

It works on web browsers, it works on servers with nodejs.

It also works on the Internet of Things Devices and can be used to make native apps.

It is also used to make cross-platform desktop apps, power your Smart TV and to play music.

What else can you expect from a programming language?

  • It’s easy to learn

JavaScript is comparatively easy to learn than most other scripting languages, provided you learn it thoroughly.

Being such a popular programming language, there is no dearth of online resources and communities where you can start learning right away.

  • Abundance of jobs

No programming language can be successful if there is no demand for it on the job market.

JavaScript is different, it’s extremely popular and high in demand.

Conditions will remain the same throughout 2019, making it ideal for any programming who’s considering new languages to venture with JavaScript.

  • Essential for game development

Right from simple shooting games to advanced games like 2048, you can use your JavaScript and HTML5 to create games that the world loves.

This further opens up more employment opportunities for you.

Cons
  • Security on the client side

One of the major problems that JavaScript faces is that its code runs on the client end.

Simply because of this its code can be manipulated and exploited for malicious reasons on the client-end.

This is why many people choose to disable JavaScript in their web browsers to enable a more secure browsing experience.

  • Browser support

Another problem with JavaScript programming language is that it is usually interpreted by different web browsers in a different way.

When you create a JavaScript program and test it only on one browser, chances are that the code will run in a completely different manner on a different browser.

Because of this, programmers have to test their code on a variety of browsers which adds time to the development process.

 TIOBE Index Rating

JavaScript was ranked #6 in the last year. It should be in the same place in 2019.

 PYPL Index Rating

JavaScript is now ranked #3 in the PYPL Index rating.

 Salary Ranges

Salary reports from the StackOverflow developer survey of 2018 show that JavaScript is associated with a salary of $98,000 in the USA.

When we speak of these values worldwide, it is about $55,000.

$98,000

$55,000

 Stack Overflow Trends

From 2009 to 2016, JavaScript had its popularity growing constantly. However, for the last 3 years, it has been going down.

 GitHub Octoverse rating

Althought JavaScript is not ranked so well in some of our analysis. It still is ranked #1 in the Github octoverse.

 How to learn JavaScript?

Pluralsight has some of the best programming courses in the world that I have ever taken.

Check out these options below and if you want you can do a Free 10-Day Trial.

Also learn Node.js, an open source server environment, which uses JavaScript on the server.

 #3. Python

Python Rating

If you’re eyeing a high paying technology job in 2019, chances are you’ll have to learn Python.

According to the Popularity of Programming Language Index (PYPL), Python is the most popular programming language as on date. It has witnessed a 15.4% growth in the last 5 years.

Python’s popularity, its simplicity and effectiveness make it an ideal choice for programmers who’re trying to make a career in data science and machine learning.

Python job posting increased by 5000 in 2018.

The reason why Python is considered the ideal language for machine learning and data science is because of the libraries and framework that it offers, right from PyBrian to PyMySQL.

Another reason that makes Python so popular among the developer community is its versatility.

Python, unlike other languages that help you in data science and machine learning, is far more versatile.

It lets you create scripts, automate things and even go into web development with libraries like Django and Flask.

Packing all this, Python is still simple and doesn’t’ have a tough syntax and weird rules that make programming cumbersome.

It’s readable, easy and setup and doesn’t have any compiler issues.

 Pros and ConsPros
  • It’s more than three decades old

Python has been around for a while and by that, we mean more than 30 years.

Because it has been around for that long, there is a vast community of Python developers and tons of valuable resources for newbies and experts alike.

It’s used for both small projects and by large organizations like Google, Facebook, etc.

According to research, Python is the fastest growing programming language and is expected to grow even further in 2019.

  • Easy to use

Unlike code written in C++ or even Java, the code that is written in Python is readable. Its language structure is versatile, yet neat and easy to understand.

It excludes any touch syntax structure and is easy for a newbie to learn and even master Python in a short amount of time.

  • No dearth of libraries

When it comes to Python, only the sky is the limit for the number of libraries that it offers.

Right from web development to machine learning, from data science to game development, there’s a Python library that lets you do a lot of things with Python.

Cons
  • It’s slow

Unlike other languages like C++ and even C programming language, Python is slow because it’s an interpreted language.

However, if you can compromise on speed on your development, then Python should serve you great.

  • Not really mobile-friendly

Python is an old language that was not conceptualized to run on mobile environments, to begin with.

This is the reason that Android and iOS don’t support Python as an official language. Although Python can still be used for mobile developments, it would require additional effort.

 TIOBE Index Rating

According to TIOBE Index, Python is gaining popularity, has one of the fastest growths, and is ranked #3.

 PYPL Index Rating

Python is ranked #1 on the PYPL and is increasing in popularity.

The PYPL Popularity of Programming Language Index is created by analyzing how often language tutorials are searched on Google.

 Salary Ranges

Salary reports from StackOverflow for 2018. In US, Python has the lowest.

$98,000

$56,000

 Stack Overflow Trends

Python has been gaining popularity on StackOverflow consistently for over 6 years.

Even better is that more than 10% of the questions on StackOverflow are related to Python.

 GitHub Octoverse rating

Python is the 3rd most popular language on Github.

 How to learn Python?

Pluralsight has some of the best programming courses in the world that I have ever taken.

Check out these options below and if you want you can do a Free 10-Day Trial.

#4. C#

C# Rating

Now coming to a language that hasn’t been around for ages but has proved its mettle among developers for whatever duration it has been here.

Created by Microsoft in 2000 as a means for building apps on the .NET platform, C# is growing in both stature and popularity.

So much so that the language won the Programming Language of the year award in the year 2012.

Today, C# is the language of choice for a wide range of organizations – both big and small.

The trend is expected to continue in the year 2019, making it important for programmers to master their skill on C# too.

So, if you’re fluent on client-side languages like HTML, CSS and Java and want to graduate to something that lets you program on the server-side too, C# should definitely be your priority in the year 2019.

This easy-to-learn and even master programming language is highly versatile in its use.

Right form games, to mobile apps to even enterprise software, nothing is beyond the boundaries of C#.

 Pros and ConsPros
  • It’s easy to learn

Ask any C# programmer and they’ll tell you that C# is probably the easiest programming language to digest.

It’s a high-level language, like Python, that is designed by Microsoft with ease-of-use in mind.

It does away with complex tasks like memory management and exception handling to help coders learn it with ease.

  • It’s evolving

Being relatively new on the arena and with backing from no other than the tech behemoth Microsoft means that the language is constantly evolving and shows no signs of slowing down.

  • It’s used in game development

The world today belongs to mobile gaming and C# is the language of choice for some renowned games on the arena.

C# is used to develop games with Unity – the popular game engine.

It is the code behind of thousands of highly popular games.

  • Opens a slew of opportunities

Being a well-rounded and efficient language mean that C# is used by thousands of corporations around the world.

In the US alone there were more than 5,000 jobs advertised for C# programmers, a number which tops 10,000 globally.

Cons
  • Less efficient than other C Languages

Unlike C++ and C programming languages, C# is not compiled but is rather interpreted.

This is one of the reasons that it’s not as efficient as other C languages.

  • Loses cross-platform capabilities

As C# programming language is tightly integrated with .NET and because it was made in the first place to allow developers to create apps using .NET, it loses any cross-platform capability. However, with the release of .NET Core, this is changing rapidly and C# can now be executed across all the common operating systems.

 TIOBE Index Rating

C# is ranked #7 in the TIOBE index.

 PYPL Index Rating

C# is now ranked #4 in the PYPL Index rating.

 Salary Ranges

Salary reports from the StackOverflow developer survey of 2018 show that C# is associated with the second greatest..

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Visual Studio errors can be very annoying. Right?

Sometimes we spend hours or even days troubleshooting problems.. Ugh!

So I’ve compiled a post on the most common Visual Studio errors that my students and I encountered. I will maintain and update this post over time.

I also supplied information on how to fix these errors.

Hope it helps… 

Visual Studio ErrorThe command “chmod + x” exited with code 9009Error Message

The command “chmod + x” exited with code 9009

Command chmod + x Visual Studio errorThe Problem

The problem is that probably occurs when you are trying to build a solution. At that point, in your console, you get this error.

This stems from the fact that you have a space somewhere in your folder structure. For example:

“C:\Source\Github\Folder With Space

The Solution

Simply rename your folder or file so that it doesn’t have a space in it. For example, change the above to:

“C:\Source\Github\FolderWithSpace

Your solution will now build correctly


Click To Tweet
Summary

Hope this was helpful?

Is there an error that you need help resolving? Please comment below and I’ll try to resolve it for you.

The post The Most Annoying Visual Studio Errors appeared first on Ultimate QA.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Source – Pixabay

Working in or with an offshore development company demands excellent performance. Code quality is essential in this event, as it should be in any case. To ensure you have the required type of code on hand for your work, you need to know how to track it.

There are also several methods you can use to enhance code quality wherever and whenever possible. Not sure how to go about all this? We’ll help you out in defining code quality and tracking it here. This way, you can avoid the risk of misdelivery and know that your team will meet the needed standards.

Defining Code Quality

Source – Pixabay

Having decent or good code quality is easy to say, but how exactly do we measure it? This requires looking at how the code fulfills certain requirements and whether it has the attributes you deem important to your business. You should go over these requirements with your development team so there are no confusions about the goal.

The main attributes in general for high code quality include the following:

  • Clarity: Code should be easy to read by any third party. They should understand it in order to maintain or extend it when needed.
  • Maintenance: One should also be able to easily understand the code’s context in case they want to change up a few things.
  • Well Documented: The best codes are self-explaining, but it’s even better if one can add on some components to explain the code’s functions. This way, even someone who wasn’t a part of the code’s creation can make sense of it.
  • Refactoring: This refers to the code formatting, which should be as consistent as possible. It should also take into account the coding conventions of the language used.
  • Tested: Your code should also have regular filtering and testing to do away with any bugs. Fewer bugs translate to higher code quality. Rigorous testing also ensures that the resulting software works in the way it’s meant to.
  • Extendibility: Any code you get should be extendible. Otherwise, it might become useless after a few weeks.
  • Efficiency Level: You know a code is of high quality when it doesn’t need too many additional resources in order to work properly.

Keep in mind that every single code you receive or work on won’t meet every one of these requirements. The more it meets, however, the more you can be sure of its high quality. Treat the list above like a priority checklist that you can change up according to what your business demands.

You can also apply certain metrics so you can get a quantitative measurement of your code’s quality. These include the following:

  • Weighted Micro Function Points
  • Halstead complexity measures
  • Cyclomatic complexity

You can also ensure that your code remains of top quality through frequent code reviews, function testing, and unit testing.

How to Track Quality Code

Source – Pixabay

When you’re in constant communication with your team, you’re likely to reduce the risk of misdelivery. However, you might still be unaware of what’s going on within the software itself. When you gain knowledge of this area, you can then ensure code quality in the best manner.

For this, you need a good software configuration management tool. One of the most common and most popular of these is called GIT. Almost all of all software development teams are making use of this tool.

You should also tell your software development team to use GitHub or a similar service for code sharing plus publishing. This would let you see how your team builds the project together and gives you an idea of the code quality level.

For bug tracking, you should use the common tool JIRA. More than 40% of the respondents make use of this to track and repair bugs and also manage projects. It does so by utilizing nitrated kanban and scrum boards, thus enabling the management and creation of sprints. Plus, it enables visibility where teams and their projects are concerned.

Finally, you can consider using Confluence, which is a sharing tool for documents and specifications. This could really boost your project work by allowing the attachment of documents or certain specifications with each task. This would make project overseeing easier instead of getting confused in the documentation. Read up on more monitoring tools at https://www.appoptics.com/monitor/scala-performance and get to really know your code quality.

You should also consider setting expectations for code quality well in advance. Decide beforehand which attributes are important for your project and what its requirements are. Once this is done, you should hold regular meetings and focus on a direct line of communication between yourself and your team. Everyone would hence know who is accountable for which area and the whole team’s productivity will go up as a result.

The post Tracking That High-Quality Code appeared first on Ultimate QA.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview