вторник, 24 октября 2017 г.

AQA: javascript: node.js(main) - SetUp environment for testing

1) Take Browser with stable functionality: Chrome, FireFox
2) 
npm install selenium-webdriver
 
To solve warning message like:
npm WARN saveError ENOENT: no such file or directory, open 'S:\temp\package.json'


Use:
1) Instruction: 
You can resolve that issue by following methods:
  1. Ensure dependencies described correctly on package.json
  2. Just type npm install and hit Enter.
  3. Check issue still exists. and If issue not resolved, continue these methods.
  4. type npm cache clean and hit Enter
  5. type sudo npm install -g npm and hit Enter.
  6. Retry npm install and hit Enter.
if issue not resolved even tried these methods, Please reply with your Node.js version, NPM version, Operating System, and package.json which is using.

2) Instruction: 
 It seems trying npm install in uninitialized npm package directory.
you should initialize package with npm init.

Use your Command Line and navigate to the root folder of your project and enter
$ npm init
This command will ask you some questions to generate a package.jsonfile in your project route that describes all the dependencies of your project. This file will be updated when adding further dependencies during the development process, for example when you set up your build system.
name: (project-name) project-name
version: (0.0.0) 0.0.1
description: The Project Description
entry point: //leave empty
test command: //leave empty
git repository: //the repositories url
keywords: //leave empty
author: // your name
license: N/A
After you've finished the process of initializing your project using the Node Package Manager, node.js created a package.jsonfile in your project's root direcotry similar to this one:
{
  "name": "project-name",
  "version": "0.0.1",
  "description": "Project Description",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "the repositories url"
  },
  "author": "your name",
  "license": "N/A"
}

Link:
Getting started with Selenium WebDriver for node.js - very good integration test
How to write reliable browser tests using Selenium and Node.js - full using 
Moving to fullstack end-to-end test automation with Node.js part 1 - Selenium Webdriver 
Selenium WebDriver is a powerful tool that plays well across different platforms
- Understanding asynchronous testing  
- Writing tests with Jasmine
Setting up your own test automation environment (+1) - a lot of tricks (multiple browsers, installation, environment variable, use URL or local document, specific keys, wait till complete, Running remote tests, mocha and chai, work with sessions,  own remote server, Integrating selenium with CI tools (also      Introduction to cross browser testing     Strategies for carrying out testing     Handling common HTML and CSS problems     Handling common JavaScript problems     Handling common accessibility problems     Implementing feature detection     Introduction to automated testing     Setting up your own test automation environment   )
driver.get('file:///Users/chrismills/git/learning-area/tools-testing/cross-browser-testing/accessibility/fake-div-buttons.html');
 

Комментариев нет:

Отправить комментарий

SEO: Эксперимент: как Яндекс и Google учитывают ключевые слова в URL

Эксперимент: как Яндекс и Google учитывают ключевые слова в URL Эксперимент: как Яндекс и Google учитывают ключевые слова в URL Дата пу...