1.0.29 • Published 7 years ago

coba v1.0.29

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Coba

Coba is simple tool to help us to do functional system testing easier.

##Installation

To install coba using npm you just need type

npm install coba

##Usage

coba support create test case, generate data

###Initiate Test

You can initiate functional test with

coba init name

//for example

coba init registration_page

###Generate data

For now coba just generate normal data and null data for invalid data.

First you need to edit config.js file and

var config = {
  /*
    browser that you use
  */
  'browser':'firefox',
  
  /*
    Scenario Test
  */
  'scenario':'test.js',

  /*
    Input form that available on your test page 
    Ex: 
      [
        {
          'type':'string',
          'selector':'.sel',
        }
      ]
  */
  'input':[
    {
      'type':'name',
      'selector': "[name='name']",
      'name':'name',
      'validation':['required','min:8','max:20']
    },
    {
      'type':'email',
      'selector': "[name='email']",
      'name':'email',
      'validation':['required','min:8','max:20']
    },
    {
      'type':'password',
      'selector': "[name='password']",
      'name':'password',
      'validation':['required','min:8']
    }
  ],
  
  /*
    your page test url
    Ex : http://www.example.com
  */
  'url':'http://todoapps.dev/register',
  
  /*
    data location ehich store our generated data
  */
  'data':'data.json'
  
}

After that we can call coba generate syntax

  coba generate input

after that you will have generated dataon your data.json. It will be like this

 {
    "value": {
      "[name='name']": "Cyril Kub",
      "[name='email']": "Summer.Hauck72@yahoo.com",
      "[name='password']": "qm0LbBWjANepvOy"
    },
    "result": "Your account has been created and activation link already send to your email"
  },
  {
    "value": {},
    "result": [
      "The name field is required.",
      "The email field is required.",
      "The password field is required."
    ]
  },
  {
    "value": {
      "[name='name']": "Camila Russel"
    },
    "result": [
      "The email field is required.",
      "The password field is required."
    ]
  }

And offcourse we provide result of the process, the result generated base on your validation on the input. for now it's just recognize required property :D

You can modified result message by create message.js on your current test folder

var messages = {
  'success': 'Your account has been created and activation link already send to your email',
  'required: "${name} field absolutelly required"
}

module.exports = messages;

After you generated input you can run test by

coba test config.js

But remember, before you run test you need Selenium standalone server to be run, check http://seleniumhq.com for download link

PS: Please note this, this project is unfinished project.

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago