Windows 7 is the Right Operating System for You?

 

Propelled in 2009, Windows 7 is starting a shockingly warmed level-headed discussion (in our gatherings, at any rate) on regardless of whether redesigning from XP is a smart thought. In case you’re in the “No” camp, we’re going to lay out seven reasons why you ought to think about changing your position to “Yes.” Due to the cost factor, many software companies have shared working Windows 7 ultimate product key for both 32 and 64 bit.

When filtering our rundown, we cordially urge you to ask yourself, “Would I extremely like to keep utilizing an eight-year-old working framework?” Followed by “Don’t I merit better?” Because regardless of how agreeable you are with some other OS, you do merit a one that is both more up to date and better, and Windows 7 will convey. Not persuaded? At that point read on.

You remember Vista? We know the greater part of you would prefer not to, and that is on account of the OS missed the mark concerning numerous customers’ desires. Therefore, many — particularly control clients — chose to skip Vista totally, and have kept running Windows XP. Thus Microsoft’s endeavor at a re-try with Windows 7. This time around, the product monster tried to crowdsource input from Microsoft fans by dispersing a free beta form of Windows 7 in January.

You whined, you requested, and accordingly, Microsoft slapped something together to transport October 22. The outcome? The general introduction of Windows 7 is well sufficiently known to welcome XP clients, however, essentially it’s sufficiently diverse to roll out your improvement the way you consider Microsoft. (I can vouch for that, being a long-lasting Mac client and ex-Windows fan).

Updating Won’t Screw You Over

Microsoft has its unwavering fans as a primary concern, including those sticking for dear life to XP. The tech mammoth guarantees that Windows 7 has been coded to help relatively every bit of programming that keeps running on your XP framework. On the off chance that, in the uncommon case one of your XP programs doesn’t take a shot at Windows 7, you can even now run it in a virtual domain called XP Mode. What’s particularly cool about this mode is you won’t need to flip between an XP emulator and Windows 7. The applications running in XP Mode seem like conventional windows that are a piece of Windows 7.

Additionally, the Windows 7 update graph may seem scary and befuddling, however, preceding discharge Microsoft intends to discharge a similarity checker that will consequently filter your framework to reveal to you which variant of Windows 7 is for you.

Naturally Installed Device Drivers

This is just a minor change, yet it tends to a noteworthy genuine annoyance in prior variants of Windows. Who has sufficient energy to scour the web for a gadget driver to work with equipment, for example, a video card or an outer hard drive? Life is too short for that waste work, and luckily Windows 7 does this task for you. Module another bit of equipment, and the OS will discover and introduce the driver to you. XP has this element, kind of, yet it works better in Vista and much better in Windows 7. No a greater amount of those irritating yellow question marks. No love lost.

Theft

Yarr! We know there are a lot of you out there downloading pilfered computerized goods, particularly in Windows arrive. Be that as it may, it’s never been helpful to be a privateer contrasted and being a paying client. For instance, in case you’re a true-blue purchaser acquiring films off iTunes, you can without much of a stretch stream your media to your truly bought Apple TV. In case you’re a privateer, you’d need to experience circuitous projects and equipment to re-make the experience.

Windows 7 is an OS basically made for privateers. Need to show your motion pictures, photographs or music on your TV? Bam! Windows Media Player will do that because of the case in the event that you have a Wi-Fi empowered TV or an Xbox. No additional projects to introduce: Windows Media Player flawlessly speaks with your Wi-Fi gadget to show your unlawful substance in all its transcendence on your favor HD TV.

Furthermore, sharing media is simple, as well. Need to download the majority of your sibling’s music? Bam! HomeGroup, a simple systems administration highlight incorporated into Windows 7, will make that super simple between PCs running the OS. Promptly after connecting to your system with Ethernet or Wi-Fi, HomeGroup will inquire as to whether you wish to join the gathering on the system, enabling you to set up simple document partaking in minutes.

A Better Interface

The new Aero highlights, which we shrouded in our Windows 7 first look, will change the way you cooperate with your PC. Air Peek will demonstrate the most helpful: The element shows layouts of all your open windows behind your dynamic window. Each illustrated box contains a thumbnail reviewing its comparing window to enable you to pick.

Innovation is developing speedier than living beings, and Windows 7 is likewise intended to function admirably with up and coming equipment. As smartphones and tablets are getting more well known in the standard (on account of the iPhone), and beyond any doubt enough Windows 7 incorporates multi-touch bolster.

While Microsoft merits praise for making such an awesome program, the organization would do well to keep its festivals short. Whatever financial triumphs Windows 7 accomplished, the product speaks to a withering breed.

Author: Sohel Ather

5 App Programming Languages That Will Make You an App Developing Maestro + 2 More

App development is a GREAT profession!

First off, though working with app development software to build apps is indeed a tech gig, it is also a creative one that can be rewarding in ways that, say, being an accountant could never be. Next, app developers get cray cray perks such as AirBnB coupons and unlimited vacations. And, finally, making apps pays. Payscale says that an app developer makes about $62,000 a year when just starting out.       

But, before you can start raking in vacations, free AirBnB stays and fat stacks of cash, you have got to make sure you know your way around app development software by being fluent in the right mobile app development programming languages regardless of if you want to build native apps, hybrid apps, or web apps. Below are the five app programming languages that you simply MUST know if you truly wish to be an app developer rock star along with two other options.    

HTML5

I know… I know… HTML is so 1990s. But HTML5 was released just a few years ago, and it is indeed an amazing coding language. In fact, it is still the programming language standard that is used on many, many app development software programs.

C++

C++ is a widely used programming language that is compatible with many app development software packages for a reason: a wide range of app development software programs use C++ because it can be used to make mobile apps for both Windows and Android devices. When paired with the right app development software, C++ is an incredible tool!

Objective-C and Swift

These two app programming languages are what will empower you to create iOS apps. Objective-C is a subset of C-language which means that its learning curve is not steep if you already know C++. The graphics and displays Objective-C produces when paired with the right app development software can be downright stunning.

Swift is the newest programming language for iOS apps. Since it is new, there are, as of yet, not as many app development software programs for it. However, the number of app development programs that can handle Swift is increasing at a rapid rate. If you develop apps for Apple devices, you must learn Swift.

Java

Java is a great programming language regardless of which app development software you are using because it is so darn flexible. First released way back in 1995, this coding language and its subsequent versions have withstood the test of time. Android app developers tend to prefer Java along with the functionality offered by their chosen app development software program.

C#

Yes, Windows does indeed make mobile devices and phones and, yes, there are Windows app developers making a great living creating these apps on their app development software. However, if you aren’t going to be making Windows apps, you can skip learning C#.

App Development Software Requiring No Coding Language

And, finally there are app development software packages that do not require any coding languages whatsoever. These no-code app development software platforms use drag-and-drop functions to create apps. However, this of course makes for clunky apps. If you want to be a professional app developer, you need to avoid using app development software that does not need app programming language.  

Contact:

Michael Kordvani | Fueled
Mike@fueled.com
516-983-7771

Why a Web-To-Print Software is Must for Online T-Shirts Selling?

Online apparel selling and especially t-shirts is a tough job. It is mandatory to remain appealing to the youth. It is more than just to provide the Game of Thrones and the Big Bang Theory tees. And, you must ensure there is always something fresh available in your catalogue.

Not all buyers prefer “the liners”, “the tacky ones”, or “the abstract”. Well, that’s the challenge faced by all the online sellers, the diversity of the demand. You can certainly look for suppliers with wide range of catalogue. But, can you continue depending on that, alone?

There’s a simple thought here. Why not let your buyers design what they want?

T-shirt Design Software

The ecommerce traffic for this festive season has surged over 75% in comparison to that of the last year. So, if you are noticing increase in your traffic less than than in your overall site traffic, your marketing efforts are only yielding below the line results. You require something more substantive. The answer for that is the addition of Web-to-Print software to allow your buyers customize the t-shirts on their own.

What Does Your Buyer Want?

Web to print software solutions won’t increase your traffic directly. It provides you a unique method to drive traffic to your site. It gives the perfect edge to your site visitors to look beyond price comparison and create something of their own. At the end, the buyer wants a canvas to use their own ideas.

Web2print software ensures that your visitors find what they are looking for using an extremely simple and easy t-shirt designing tool.

Add Value and Brand Equity

You want to be remembered. You want your buyer to brag about their purchase. You require your buyers to feel the sense of pride and be a promoter of your products. In the price-savvy and consumer driven segment, the word of mouth is the best way to get ahead in the race. What better way there could be than to give the option to customize the t-shirts to your buyers?

Be it adding the picture of their choice, or add a tag line written by them, or creating a sketch that’s fitting for the festive season – it is always beyond what your predefined catalogue can offer. You require a tool that is seamless to integrate, easy to use by the end user and offers wide range of features for t-shirt designing.

Offer Reseller Model

Additionally, give your buyers a choice to become sellers. Once the t-shirt is customized, offer the option to buyer whether they wish to list their design for others to purchase. Create a reseller model that offers commission to the resellers on the future purchases of their design. This will add tremendous value to your buyers to design t-shirts and continue expanding your catalogue.

Corporate Orders

Theme t-shirts is what the bulk buyers are always on the look-out. Company events, theme birthday parties, and various other type of events require such theme t-shirts. Propel your marketing efforts towards attracting these bulk buyers. From simplest of the customizations like adding a company logo to complex designs to the limits of the creativity of the party poppers – you can offer all of these solutions through an easy integration of Web-to-Print Software.

Experience of Buying is All That Matters

At the end of the day, the buying experience is what you are selling. Better the experience, faster you can grow. In order to enrich the buying experience, you must adopt tools such as web to print software solutions.

Some of the known use-cases to make your store popular are:

  • Allow your customers to customize products as per their choice
  • Offer “Become an Online Seller” platform to your buyers and enthusiast creative wizards to sell t-shirts online
  • Optimize your supply chain through addition of your buyers as source of new designs
  • Bring in volume business through bulk orders from corporates and groups requiring customized t-shirts

Web to print software solutions and the use cases mentioned here just the tip of the iceberg. Provide a stable and effective tool to your Marketing and Product teams. Their creative ideas and marketing strategies could just be game changing innovation to make this Christmas season your quarter of the business.

Contact Details:

Pratik Shah | brushyourideas@gmail.com
Contact Number: 9106747559
https://www.brushyourideas.com

APPIUM: IOS TESTING WITH NODE.JS STEP-BY-STEP GUIDE

Good day to everyone, in this tutorial, we will go through the process of writing node.js tests for iOS, from software installation to running actual tests on simulated devices with use of Appium.

Appium is a freely distributed open source framework for mobile application UI testing. Appium supports all languages that have Selenium client libraries like Java, Objective-C, JavaScript with node.js, PHP, Ruby, Python, C# etc.

Prerequisites to use Appium for iOS testing:

  1. OS X. I recommend using OS X Sierra (10.12 or higher). This is an essential requirement, since Appium cannot start sessions for iOS without Xcode, which is available only for Mac.
  2. JDK (Java Development Kit).
  3. Xcode. Get one either from AppStore or Apple Developer. By default, comes with iOS SDK, which we will need for running simulators.
  4. Homebrew – package manager for Mac. Will make our life easier in the long run.
  5. Appium Client for Mac (client).
  6. IDE and testing framework of choice. In our case, we will use js and mocha testing frameworks, so we need to install node.js at first. We will do so in the “Environment Setup” section below. NOTE: even though Appium client supplied with “Node.exe” and NPM (node package manager), we will install those manually to have the latest version.
  7. carthage – dependency for running XCUItests for iOS apps.

Environment Setup

Step 1. Download and install Xcode. Go to AppStore and type “xcode” in a search field. Grab the first one, provide your Apple ID if needed. After download is completed, go to the Applications folder and run Xcode to finish installation.

Step 2. Install Homebrew.

2.1. Open your terminal and run this command “/usr/bin/ruby –e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)“” (without outer quotes). Homebrew will start installation and ask for root password if needed. Just follow installation guidelines and you’ll be fine. For more details visit Homebrew site.

2.2. After installation run “brew doctor” (without quotes) to verify, that everything is okay.

2.3. Run a command “export PATH=”/usr/local/bin:$PATH”” (without outer quotes).

Step 3. Install node.js.

3.1. We will use Homebrew for this, so in terminal run a command “brew install node”. This will setup everything you need.

3.2. After installation, run commands “node –v” and “npm –v” to see installed version of node.js and npm respectively.

Step 4. Download and install JDK. After download is complete, navigate to your Downloads folder, double-click the downloaded .dmg file and follow installation instructions.

Step 5. Download and install Appium Client. Installation process doesn’t differ from the one described in Step 4.

Step 6. Install carthage. Simply run “brew install carthage” in the terminal.

Now, all of the required software is installed, let’s proceed with further setup.

Simulator setup.

In order to run our tests, we will need a device to run them on. For sake of this tutorial we will use iOS simulator, which is bundled with Xcode.

Step 1. Press Command + Space to launch Spotlight.

Step 2. Type Simulator and hit Enter.

Step 3. Launch a Simulator from search results

Step 4. When in Simulator, click the “Hardware” menu, then the “Device” → “Manage Devices…”.

Step 5. In a Devices window you can view all available devices to you. Click the one you want to use for tests, let’s say “iPhone SE” with iOS version of 10.3.1.

Step 6. We will need info about the name, iOS, and Identifier to start both Appium Inspector session and our test execution. NOTE: if you need to run tests on device with iOS version not presented in list, you can create it by yourself.

6.1. Click the “+” button at bottom left corner of the window and choose the “Add Simulator”.

6.2. Set device name (it is mandatory to set unique device name), choose device type and iOS version. Download one you need if it is not presented in list.

6.3. Now you should see the newly created simulator in a list of simulators. Do not close this window yet as we will need it.

Step 7. Launch the Appium Client from your Applications folder.

Step 8. Type “localhost” (without quotes) in a Host field and click the “Start Server v.1.6.5” button. Now we have Appium Server up and running.

Step 9. Click the “Start Inspector Session” (button with magnifier on it). You should see this:

Step 10. Now, let’s specify details of simulator we want to use and app we want to install. Create the following set of Desired Capabilities:

Points to remember here:

  • app – full path to your built app on Mac. I’m using TestApp provided by Appium Team and available hereIn case you want launch tests for Safari, omit this option and use “browserName”: “safari” NOTE: your app must be built specifically for simulator and testing purposes.
  • platformName – name of our platform. Since we want to run iOS tests, type iOS.
  • platformVersion – version of iOS on tested device. Look at “iOS” parameter of your simulator of choice on the “Devices” window and set it here.
  • deviceName – name of device you want to use. Grab the “Identifier” parameter of desired simulator on the “Devices” window and set it here.

Step 11. After that, switch back to your Simulator, go “Hardware” → “Device” and choose a device type you want if your simulator isn’t already of that type. Wait for Simulator to restart and keep it running – this will decrease Appium Inspector startup time drastically.

Step 12. In Appium, click the “Start Session” button. You should see app being installed on your simulator of choice as good as Appium Inspector loading. NOTE: if you’ve encountered Appium error stating “could not get xcode version” you may want to set path to Xcode manually. In terminal, run commands “sudo xcode-select –reset” and sudo xcode-select –switch /Applications/Xcode.app (both without quotes). This should fix the issue. You should specify path to your Xcode.app according to your installation folder in case it differs from Applications. You should see something like this:

 

Writing tests

Now, we have everything set up. At this point, we can proceed with writing tests for our app using node.js.

Step 1. In Documents, create a new folder and name it “ios-node-test”. This will be our project folder.

Step 2. Open Terminal and navigate to your project folder using command “cd /full/path/to/your/folder” or start it in project folder directly.

Step 3. Execute the “npm init” command in the folder. Follow the setup process in a command line to configure package.json file of your project.

Step 4. After the basic setup, we need to add a bunch of dependencies in order to make our tests work. We will use mocha as our testing framework with chai for assertions. Also, we will require webdriverio testing utility, which improves interaction with mobile web, native and hybrid apps. So, run the following commands:

  • npm install mocha
  • npm install chai
  • npm install chai-as-promised
  • npm install wd
  • npm install wdio-mocha-framework –D (–D parameter here stands for installation this dependency only for developers)
  • npm install webdriverio@4.7.1 –D

NOTE: at the time of writing this guide the latest version of webdriverio is 4.8.0. However, we are installing v.4.7.1 due to setValue() method working incorrectly when using webdriverio v.4.8.0 in conjunction with Appium v1.6.5. Probably, fix for this issue will be included in future releases either from Appium or Webdriverio team.

Step 5. Create a subfolder and call it “helpers”. In “helpers” create file with .js extension and name in “desiredCapabilities”. In this file we will specify all the necessary details for our script, such as application we want to run and device we want to use for testing. Here is the completed content of the file, which follows our previous steps:

As you can see, in desiredCapabilities we haven’t change anything compare to Appium Inspector, although you may consider setting apps bundle id if you have one.

Step 6. Return to project folder and create a file “native.js”. This will be our script to run tests for native app. In order to locate elements, we will use accessibility id strategy, provided by webdriverio, for example:

.click(‘~IntegerA’)

This resource is specific to TestApp application, provided by Appium team as code sample. To get accessibility id of the element or any other identifier available we will use Appium Inspector. Just click the element while in the “Select” mod to properties panel to appear and grab the most suitable attribute or identifier. If by any means you cannot retrieve any selector except xpath you can use it as well, for example:

.click(//XCUIElement TypeButton[@name=”ComputeSumButton”])

 

Step 7. With that in place, we are ready to start scripting. As I said earlier, we will use webdriverio for writing our test, so consider looking at their docs for more info.

7.1. Let’s import all required components and create client – main object for interactions and actions:

var webdriverio = require(‘webdriverio’);

var expect = require(‘chai’).expect;

var config = require(‘./helpers/desiredCapabilities’).options;

var client = webdriverio.remote(config);

7.2. Now, create the main function by using describe keyword and pass “Simple cases” as the first parameter. This function will wrap our tests and declare before hook. This will be executed before our test-suite.

describe(‘Simple cases’, function () {

before(function () {

this.timeout(50000);

return client.init();

});

7.3. Create a sub-function by using describe keyword and call it “test-app-addition”. Set timeout for executing tests of this suite and write the tests with use of it keyword.

describe(“test-app-addition”, function(){

it(“add-3-3”, function(){

return client.element(‘~IntegerA’)

.setValue(“3”)

.element(‘~IntegerB’)

.setValue(“3”)

.click(‘~ComputeSumButton’)

.element(‘~Answer’)

.getText()

.then(function (text) {

expect(text).to.equal(‘6’);

});

});

});

7.4. In scope of wrapper function, add after hook, which will close the connection as well as the AUT.

after(function() {

return client.end();

});

});

Step 8. Open “package.json” and under scripts section add exactly the same line: “native”: “mocha native.js”. This will allow us to run our test by “npm run native”.

Step 9. Finally, your “ios-node-test” folder should be like this:

And “helpers” folder should be like this:

Step 10. Close your Appium inspector by hitting the “Quit Session & Close Inspector” button at the top-center panel.

Step 11. Run a script by executing “npm run native” in your project folder. You should see execution process on your device as good as mocha log in the console:

That’s it! Now you know how to install, setup and configure all required software to run your tests for iOS UI automated tests, as well as prepare environment for your tests. And, of course, you have a basic knowledge about writing tests themselves using node.js with webdriverio and mocha.

TestMatick company offers automation testing services for web and mobile applications. With TestMatick you can also utilize all the advantages of continuous integration. It includes setup of the environment which automatically integrates all parts of a project and executes tests every-time when someone makes a commit to the version control.

We provide QA automation services using the following automation tools:

– Selenium WebDriver
– Appium
– Automated QA TestComplete
– HP / Mercury QTP
– Segue SilkTest
– Ranorex
– Robotium

Browser Automation with Nightwatch and Selenium

Nightwatch.js is an end‑to‑end Node.js powered testing framework. It is provided as a Node.js module and relies on a Selenium WebDriver which has now become a part of W3C specification.

The overview is focused on configuring Nightwatch on a Windows 10 machine.

Environment Setup

Nightwatch is Node.js‑based tool. Since that it requires Node.js platform to be installed the latest version which can be obtained on the official web site. When installing ensure that npm package manager (stands for node package manager) is marked for installation among other features. Also, for your convenience, mark Node.js and npm to be added to PATH environment variable.

Node.js setup. npm package managerThe npm tool is used for actual Nightwatch framework installation. To ensure npm is properly installed check its version by executing

Other npm CLI commands description can be found here.

The next step is to install Nightwatch itself. Run the following install command:

npm install –global nightwatch

The –global option here allows to use Nightwatch as a command line tool (by simply entering nightwatch keyword). The next tool we need is the Selenium Server. It acts as a bridge between Nightwatch and a browser(s). Selenium Server is a Java application contained in a JAR file the latest version of which can be downloaded from this page. In order to launch Selenium the Java Runtime Environment (JRE) needs to be installed on a running machine. The minimum required version is the 6th for older Selenium versions (2.22.0 up to 2.47.0). 3.0.0+ versions require Java 8. To check Java version (and its presence by the way =) ) execute the following command:

Selenium Server version used in this article is 3.4.0 . selenium-server-standalone-{$version}.jar may be launched manually by running:

java -jar selenium-server-standalone-{your_version_here}.jar [-additional-arguments]

This is especially useful when running Selenium Server on a remote machine. Since we have Nightwatch on the same machine where Selenium is, we’re going to manipulate selenium-server-standalone directly from Nightwatch configuration.

Configuration Settings

Our project is going to have next structure:

Note. There is no need of creating reports folder explicitly since it will be created automatically after the test has run.

To run tests JSON configuration file needs to be passed to nightwatch app. By default configuration file name is nightwatch.json. This means when simply running nightwatch without –config option passed in a directory with tests, it searches for nightwatch.json configuration file. Nightwatch also accepts JS configuration file searching nightwatch.conf.js by default. Note that nightwatch.conf.js takes precedence over nightwatch.json configuration if both are found. nightwatch.conf.js may be used for settings overriding or additional environment configuration.

Here is nightwatch.json configuration file example we are going to use in our test.

{  "src_folders" : "tests",  "output_folder" : "reports",

  "selenium" : {
    "start_process" : true,
    "server_path" : "bin/selenium-server-standalone-3.4.0.jar",
    "log_path" : "reports",
    "port" : 4444,
    "cli_args" : {
      "webdriver.chrome.driver" : "bin/chromedriver.exe",
      "webdriver.gecko.driver" : "bin/geckodriver.exe"
    }
  },

  "test_settings" : {
    "default" : {
      "selenium_port"  : 4444,
      "screenshots" : {
        "enabled" : true,
        "on_failure" : true,
        "on_error" : false,
        "path" : "reports/screenshots/"
      },
      "desiredCapabilities": {
        "browserName": "chrome",
        "javascriptEnabled" : true,
        "assertSslCerts" : true,
        "chromeOptions" : {
          "args" : ["--start-maximized"]
        }
      }
    },

    "firefox" : {
      "desiredCapabilities" : {
        "browserName" : "firefox",
        "javascriptEnabled" : true,
        "assertSslCerts" : true
      }
    }
  }
}

Here is a similar configuration implemented as JS file:

 

var selenium_config = {    start_process: true,    server_path: "bin/selenium-server-standalone-3.4.0.jar",
    log_path: "reports",
    port: 4444,
    cli_args : {
        "webdriver.chrome.driver" : "bin/chromedriver.exe",
        "webdriver.gecko.driver" : "bin/geckodriver.exe"
    }
};

var chrome_config = {
    browserName: "chrome",
    javascriptEnabled: true,
    assertSslCerts: true,
    chromeOptions: {
        args: ["--start-maximized"]
    }
};
var default_config = {
    selenium_port: 4444,
    screenshots: {
        enabled: true,
        on_failure: true,
        on_error: false,
        path: "reports/screenshots/"
    },
    desiredCapabilities: chrome_config
};
var firefox_config = Object.assign({}, default_config, {
    desiredCapabilities: {
        browserName: "firefox",
        javascriptEnabled: true,
        assertSslCerts: true
    }
});
var environments = {
    default: default_config,
    firefox: firefox_config
};

module.exports = {
    src_folders: "tests",
    output_folder: "reports",
    selenium: selenium_config,
    test_settings: environments
};

Let’s walk around some important and useful configuration settings according to the documentation.

Basic settings

Configuration root settings

Name Type Default Description
src_folders string|array none An array of folders (excluding subfolders) where the tests are located.
output_folder (optional) string ‘tests_output’ folder The location where the JUnit XML report files will be saved.
page_objects_path (optional) string|array None Location(s) where page object files will be loaded from.
selenium (optional) object An object containing Selenium Server related configuration options. See Selenium configuration settings section.
test_settings object This object contains all the test related options. See Test configuration settingssection.
test_workers boolean|object False Whether or not to run individual test files in parallel. If set to `true`, it runs the tests in parallel and determines the number of workers automatically. If set to an object, it can specify the number of workers as “auto” or a “number”.

Example:

“test_workers” : {

“enabled” : true,

“workers” : “auto”

}

test_runner string|object “default” Specifies which test runner to use when running the tests. Values can be either “default” (built in nightwatch runner) or “mocha”. Example:

“test_runner” : {

“type” : “mocha”,

“options” : {“ui” : “tdd”}

}

Selenium configuration settings

“selenium” object’s settings

Name Type Default Description
start_process boolean False Whether or not to manage the selenium process automatically. If this option set to true server_path option must be set.
start_session boolean true Whether or not to automatically start the Selenium session. This will typically be set to false when running unit/integration tests that don’t interact with the Selenium server.
server_path string none The location of the selenium jar file. This needs to be specified if start_process is enabled. E.g.: bin/selenium-server-standalone-3.4.0.jar
log_path string|boolean none The location where the selenium output.log file will be placed. Defaults to the current directory. To disable Selenium logging, set this to false
port integer 4444 The port number Selenium will listen on. Note. If set to other than default value selenium_port setting must be set in accordance with this setting.
cli_args object none List of cli arguments to be passed to the Selenium process. Here you can set various options for browser drivers, such as: ·         webdriver.firefox.profile: Selenium will be default create a new Firefox profile for each session. If you wish to use an existing Firefox profile you can specify its name here.
Complete list of Firefox Driver arguments available here.

·         webdriver.chrome.driver: Nightwatch can run the tests using Chrome browser too. To enable this, you need to download the CromeDriver binary and specify its location here. Also, don’t forget to specify chrome as the browser name in the desiredCapabilities object.

·         webdriver.ie.driver: Nightwatch has also support for Internet Explorer . To enable this, you have to download the IE Driver binary and specify its location here. Also, don’t forget to specify “internet explorer” as the browser name in the desiredCapabilities object.

Test configuration settings

“test_settings” object’s configuration

Name Type Default Description
launch_url string none The URL which can be used in the tests as the main URL to load. Can be useful if your tests will be run on different environments, each one with a different URL.
selenium_host string localhost The hostname/IP on which the selenium server is accepting connections.
selenium_port integer 4444 The port number on which the selenium server is accepting connections.
silent boolean true Whether to show extended Selenium command logs.
output boolean true Use to disable terminal output completely.
screenshots object none Selenium generates screenshots when command errors occur. With on_failure set to true, also generates screenshots for failing or erroring tests. These are saved on the disk. Since v0.7.5 you can disable screenshots for command errors by setting on_error to false.

Example:

“screenshots” : {

“enabled” : true,

“on_failure” : true,

“on_error” : false,  “path” : “”

}

desiredCapabilities Object An object which will be passed to the Selenium WebDriver when a new session will be created. You can specify browser name for instance along with other capabilities.
use_xpath boolean false Use xpath as the default locator strategy.

Let’s now create a simple test and name the file google_test.js:

module.exports = {    'Search test' : function(browser) {        browser
            .url('http:google.com')
            .waitForElementVisible('body', 1000)
            .setValue('input[type=text]', 'testmatick')
            .waitForElementVisible('button[name=btnG]', 1000)
            .click('button[name=btnG]')
            .pause(1000)
            .assert.containsText('#main', 'testmatick.com')
            .end();
    }
};

For successful test execution, on both Chrome and Firefox browsers, chromedriver and geckodriver must be downloaded. In our test we use chromedriver_win32_v.2.29 and geckodriver-v0.16.1-win64.

Running tests

Before running the code ensure port 4444, which is going to be used by our test execution, is not occupied by other processes. To check busy ports, you may run the following command:

netstat -aon | more

and check in Local Address column whether a port you desire to use is currently busy.

Now just cd to the project and execute:

nightwatch

Chrome browser is launched by Nightwatch. You should see similar console output

In case of busy port, you may see infinite Starting selenium server… message

Busy port

In this case simply press Ctrl+C, type y and press Enter.

Busy port interrupt

Set other free port then in both port and selenium_port.

To run the test in Firefox browser, execute:

nightwatch –env firefox

Note. firefox option is related to declared environment name not to the browser itself:

"firefox" : {      "desiredCapabilities" : {        "browserName" : "firefox",
        "javascriptEnabled" : true,
        "assertSslCerts" : true
      }
    }

Let’s run the test in both browsers simultaneously. To perform this execute:

nightwatch –env default,firefox

Note. There should be no spaces between comma‑separated –env values. You should see similar console output

Run test in both browsers simultaneously

You may also use nightwatch.conf.js for the same test with same options launching. Just put mentioned JS configuration file in the project root directory (where the nightwatch.json is):

Now run same commands additionally passing –config option:

nightwatch –config nightwatch.conf.js
nightwatch –config nightwatch.conf.js –env firefox
nightwatch –config nightwatch.conf.js –env default,firefox

Mentioned option denotes nightwatch.conf.js as the only configuration file, in which case nightwatch.json is simply ignored. The results are the same as they would be when using nightwatch.json as a configuration file.

Author:
Testmatick is a leading provider of software test automation services with help of Nightwatch and Selenium. We utilize a wide range of well-known tools and custom-developed test automation solutions.

1 2 3