-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement json protocol #2
Comments
Hi @cbeust , @juherr to organize the packet, we can either use delimiter or length based packet format. either format is extensible. I think the delimiter based packet is easy to implement. |
@missedone Before the implementation, I think we should talk with IntelliJ and Netbeans too. Maybe they have some needs which could be added at the same time. |
I recently had to do this for Kobalt and I implemented a two pass JSON The code reads the id and once it knows which command is being requested, Cédric On Wed, Dec 16, 2015 at 6:12 PM, Julien Herr notifications@github.com
|
for now, my only concern is, since this will introduce json lib to TestNG process, it is used to marshall/unmarshall the message, no matter which json lib we use, jackson, jettison, gson or naming a few, (for now, i'm using gson 2.5 in my test), this will make a chance for json lib version conflict with the one of user's project depends. just like plugin issue testng-team/testng-eclipse#111 one option is shading the json lib into testng-temote.jar, what do you see any better option? |
No, shading is probably the safest solution. Cédric On Sat, Dec 26, 2015 at 8:07 PM, Nick Tan notifications@github.com wrote:
|
feature #2: impl json message protocol
IntelliJ doesn't use testng-remote anymore as we bundle testng plugin (and it's impossible for users to download different plugins for different testng versions used in user's projects) and the old protocol failed to communicate if sender/receiver are from different versions (objectSerialization) and the very old string-protocol doesn't support new features. I believe that junit team tries (at least they discussed the remote protocol) to solve similar problems and it would be perfect to communicate with them too (https://github.com/junit-team/junit-lambda). |
@juherr
that's exactly where the new protocol come from. for now, we prefer to use json as the message format, in general, the message protocol spec looks like:
{"type":1,"data":{"messageType":1,"suiteCount":1,"testCount":1}}
{"type":10,"data":{"suiteName":"Default suite","methodCount":0,"startSuiteRun":true,"excludedMethods":[]}}
{"type":100,"data":{"testStart":true,"suiteName":"Default suite","testName":"Default test","testMethodCount":2,"
passedTestCount":0,"failedTestCount":0,"skippedTestCount":0,"successPercentageFailedTestCount":0}}
{"type":1000,"data":{"messageType":1016,"suiteName":"Default suite","testName":"Default test","testClassName":"m
ymixed.GreetingTest","testMethodName":"greetingTest","startMillis":1451316147629,"endMillis":0,"parameters":[],"paramTypes":[],"testDescription":"","i
nvocationCount":1,"currentInvocationCount":0,"instanceName":"mymixed.GreetingTest"}} we'd like to hear from you, so it's still opening for any advice or changes. thanks |
Should this format work with old testng versions? Like separate jar ready for tool vendors to be bundled and passed into the test's VM (by now we assume that all jars passed to the clients VM should be 1.3 compatible)? Or would it be the part of testng.jar, so tool vendors would need to switch between protocols based on version of testng used by user? |
hi @akozlova
so, yes, this protocol works with old testng versions by adding all the jars compiled with Java7 so it's not 1.3 compatible. |
testng eclipse plugin by default use remote testng objectSerialization protocol to transfer the message, but we suffered issue like http://github.com/cbeust/testng-eclipse/issues/91 due to missing serialVersionUUID; though we are fine once we explicitly set the serialVersionUUID in PR testng-team/testng#913, it'd be nice to experiment with new ison protocol
The text was updated successfully, but these errors were encountered: