8000 Test setup enhancements? · Issue #88 · andrewrk/naught · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Test setup enhancements? #88
Open
Open
@revington

Description

@revington

Is there a way we can enhance the tests? I find pretty difficult to work with them. Scenarios:

  • When something is failing I can not run only that failing test, therefore debugging is more complicated
  • When stuff fails, printing debug messages to stderr or stdout it will not help you because
    • They are not displayed
    • They change the expected output of the program and therefore the test fail because it checks std*

On top of that there is a weird thing that happens to me. Sometimes the tests still broken even if I reset the repo removing all of my changes. Here is the output:

SIGTERM in no daemon mode causes a stop...pass
(test setup) use server3.js...pass
(test setup) mkdir foo...pass
cli accepts non-default args...
assert.js:92
  throw new assert.AssertionError({
        ^
AssertionError: actual:
unable to connect to ipc-file `some/dir/ipc`

1. the ipc file specified is invalid, or
2. the daemon process died unexpectedly

expected:
Bootup. booting: 0, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 1, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 2, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 3, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 4, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 5, online: 0, dying: 0, new_online: 0
NewOnline. booting: 4, online: 0, dying: 0, new_online: 1
NewOnline. booting: 3, online: 0, dying: 0, new_online: 2
NewOnline. booting: 2, online: 0, dying: 0, new_online: 3
NewOnline. booting: 1, online: 0, dying: 0, new_online: 4
NewOnline. booting: 0, online: 0, dying: 0, new_online: 5


    at assertEqual (/home/pedro/Documents/work/d3media/naught2/test/test.js:1045:3)
    at /home/pedro/Documents/work/d3media/naught2/test/test.js:457:9
    at /home/pedro/Documents/work/d3media/naught2/test/test.js:919:5
    at ChildProcess.<anonymous> (/home/pedro/Documents/work/d3media/naught2/test/test.js:894:5)
    at ChildProcess.EventEmitter.emit (events.js:98:17)

Test will not pass even if I reset the repo.

Some ideas:

  • Group different test into different files
  • Add events so we can trace application behavior like
  • Split unit test from system/integration tests

I understand that these changes implies a lot of work but I will happily contribute to it if you are open to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0