Skip to content

keegoo/anyday

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

introduction

anyday only been tested in Ubuntu 16.04.

anyday only been tested under android Device API level: 22.

anyday was developped with Javascript + appium.

Prerequisites

You need to install Java, Node and Android sdk.

note: as ES6 was used for writing Javascript, it's better node's version be higher than v6.11.0

$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
$ node -v
v6.11.1
$ echo $ANDROID_HOME
/home/keegoo/Android/Sdk

ENV setup

note: following commands all should be executed inside anyday folder!!!

install npm packages

$ npm install

emulator

Currently only support Android api level 18 and 22

run scripts

start appium:

$ ./node_modules/.bin/appium

specify .apk location and api level in src/anyday.js:

const config = {
  // choose which api level be tested
  androidAPILevel: '22',
  // == specify .apk package location ==
  app: : '/home/keegoo/Desktop/workplace/QATestChallege.apk'
}

run script:

$ node src/anyday.js

If you want to run other cases, simply change var calendar inside src/anyday.js

  // ======= change calendar here=======
  const calendar = '2025-12-31'
  // examples: 
  // const calendar = '2017-01-31'
  // const calendar = '2021-12-01'
  // const calendar = '2000-01-01'
  // ===================================

run tests

I write unit tests for src/utils.js.

Use following commands to execute the tests:

$ npm run test

About

homework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published