Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    NoseJS 0.9.4

    Download button

    No screenshots available
    Downloads: 309  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    kumar303 | More programs
    GPL / FREE
    September 15th, 2009, 07:28 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    NoseJS description

    A Nose plugin to run JavaScript tests using Rhino in a Java subprocess.

    NoseJS is a Nose plugin to run JavaScript tests using Rhino in a Java subprocess.

    Usage:

    Here is the most basic way to invoke NoseJS (assumes you've downloaded Rhino into ~/src)

    $ nosetests --with-javascript --rhino-jar ~/src/rhino1_7R1/js.jar

    This command would look for any files along Nose's path ending in .js that match Nose's current test pattern, collect them all, then execute them using Rhino in a single Java subprocess at the end of all other tests. By default, files looking like test*.js will be collected and run.

    The idea behind NoseJS is that you might have a Python web application that relies on JavaScript for some of its functionality and you want to run both Python and JavaScript tests with one command, nosetests. You can put these JavaScript tests wherever you want in your project.

    Here is a more realistic example that shows how the Fudge project is tested simultaneously for Python and JavaScript functionality. Its project layout looks roughly like this:

    |-- fudge
    | |-- __init__.py
    | |-- patcher.py
    | |-- tests
    | | |-- __init__.py
    | | |-- test_fudge.py
    | | |-- test_patcher.py
    |-- javascript
    | |-- fudge
    | | |-- fudge.js
    | | |-- tests
    | | | |-- test_fudge.html
    | | | `-- test_fudge.js
    `-- setup.py


    Both Python and JavaScript tests can be run with this command:

    $ nosetests --with-javascript
     --rhino-jar ~/src/rhino1_7R1/js.jar
     --with-dom
     --js-test-dir javascript/fudge/tests/
    ......................................................
    ----------------------------------------------------------------------
    Test Fake
     can find objects
     can create objects
     expected call not called
     call intercepted
     returns value
     returns fake
    Test ExpectedCall
     ExpectedCall properties
     call is logged
    Test fudge.registry
     expected call not called
     start resets calls
     stop resets calls
     global stop
     global clear expectations

    Loaded 6 JavaScript files

    OK
    ----------------------------------------------------------------------
    Ran 54 tests in 0.392s

    OK


    The dots are the Python tests that were run and the output below that is what Fudge's JavaScript test files printed out.


    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · Multiple paths for the --javascript-dir option can now be specified on multiple lines in setup.cfg

      


    TAGS:

    Nose plugin | JavaScript tests | Java subprocess | Nose | JavaScript | Rhino

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM