Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 396648

Summary: Need sort of unit test mechanism for Orion node server APIs.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2012-12-14 15:40:55 EST
From Mark's open issue 11:

I find our lack of tests disturbing.

There are currently no tests for the Orionode server's REST APIs. This will not stand.

The APIs that need to be tested are:

/file
/workspace
/node (still in flux due to issue #6)
The test runner basically needs to do this:
1. Launch Orionode server
2. Perform requests to one of the APIs
3. Verify the response.

Since the /file and /workspace APIs are a direct clone of the Orion Java server's APIs, we should investigate whether the Java server tests can be reused. If that's unfeasible (which it may be, as those tests depend heavily on a lot of Java server code), then maybe we can just borrow some of their test logic.
Comment 1 libing wang CLA 2012-12-14 15:43:35 EST
Transferred https://github.com/mamacdon/orionode/issues/11 to here.
Conversation histories:

Mark:
Should investigate Mocha(https://github.com/visionmedia/mocha) for unit testing.

Boris:
We are currently using Mocha tests for our project and they work pretty well.
Comment 2 John Arthorne CLA 2012-12-14 16:49:30 EST
Majority of the Java tests should "just work" against a node server that implements the same server API. You would probably need to fork and make some modifications though, especially around authentication where it reaches into the server implementation to configure some things that cannot be done via HTTP APIs. 

In the end you might be better off with a pure js test suite though.
Comment 3 John Arthorne CLA 2015-05-05 15:48:43 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html
Comment 4 John Arthorne CLA 2015-05-05 16:01:52 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html