Testing

Corey Donohoe edited this page Feb 15, 2011 · 1 revision
Clone this wiki locally

Make sure you have your development environment running

Jinkies uses vows for testing. You can install it with npm.

$ JENKINS_SERVER=http://localhost:8080  \
  JENKINS_PROJECT=orgname-projectname \
  make test

♢ Jenkins Job API

  Jenkins Jobs can
    ✓ get the hostname
    ✓ get the job name
  Jenkins Jobs#build_for can
    ✓ get info about a build number
  Jenkins Jobs#builds can
    ✓ get a list of builds
  Jenkins Jobs#status can
    ✓ get the status of a project

♢ Jenkins Server API

  Jenkins Servers can
    ✓ get the hostname
    ✓ parse the hostname
    ✓ parse the port number
  Jenkins.Project can
    ✓ get the hostname
    ✓ get the project name
  Jenkins Server#projects
    ✓ list the projects
  Jenkins Server#project_names
    ✓ list the project names

✓ OK » 12 honored (0.377s)

If you have the dev task running in another shell you can run individual tests pretty easily.

$ JENKINS_SERVER=http://localhost:8080  \
  JENKINS_PROJECT=orgname-projectname \
  node spec/job_spec.js
·····