diff --git a/.github/workflows/test.js.yml b/.github/workflows/test.js.yml index 66d65f1..87e81c1 100644 --- a/.github/workflows/test.js.yml +++ b/.github/workflows/test.js.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: node-version: [10.x, 12.x, 14.x] - robot-version: [2.8.7, 2.9.2, 3.0.4, 3.2.1] + robot-version: [2.8.7, 2.9.2, 3.0.4, 3.1.2, 3.2.1] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} and Robot Framework ${{ matrix.robot-version }} diff --git a/lib/robotremote.js b/lib/robotremote.js index 4f2c01d..8a00f1a 100644 --- a/lib/robotremote.js +++ b/lib/robotremote.js @@ -70,6 +70,7 @@ function Server(libraries, options, listeningCallback) { this.server.on('get_keyword_arguments', rpcWrap(this.getKeywordArguments)); this.server.on('get_keyword_documentation', rpcWrap(this.getKeywordDocumentation)); this.server.on('get_keyword_tags', rpcWrap(this.getKeywordTags)); + this.server.on('get_keyword_types', rpcWrap(this.getKeywordTypes)); // Register signal handlers. var handleSignal = function () { @@ -101,6 +102,11 @@ Server.prototype.getKeywordTags = function (name, response) { response(null, this.keywords[name].tags || []); }; +Server.prototype.getKeywordTypes = function (name, response) { + // https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#argument-types + response(null, this.keywords[name].types); +}; + Server.prototype.getKeywordArguments = function (name, response) { response(null, this.keywords[name].args); }; diff --git a/test/robotremote.robot b/test/robotremote.robot index 8a438fb..8b1fa25 100644 --- a/test/robotremote.robot +++ b/test/robotremote.robot @@ -3,7 +3,7 @@ Library Process Library String Suite Setup Start Remote Server -Suite Teardown Stop Remote Server +Suite Teardown Collect Logs and Stop Server *** Variables *** @@ -11,7 +11,6 @@ ${HOST} localhost ${PORT} 8270 *** Test Cases *** - Run Synchronous Keyword Without Return Value And No Arguments ${result}= Do Nothing Should Be Equal ${result} ${EMPTY} @@ -61,11 +60,21 @@ Run Asynchronous Failing Keyword Never Returning Keyword Should Fail After Timeout Run Keyword And Expect Error Error: Keyword execution got timeout Never Return +Generate Documentation + Run Process python -m robot.libdoc Remote::http://${HOST}:${PORT} example.html + Process Should Be Running + *** Keywords *** Start Remote Server ${remote}= Start Process node ./test/testlibrary.js ${HOST} ${PORT} Sleep 1s - Process Should Be Running ${remote} + Process Should Be Running Import Library Remote http://${HOST}:${PORT} +Collect Logs and Stop Server + Run Keyword And Ignore Error Stop Remote Server + Wait For Process + ${result} Get Process Result + Log ${result.stdout} + Log ${result.stderr} diff --git a/test/test.js b/test/test.js index 9d1dcde..1c9ced9 100644 --- a/test/test.js +++ b/test/test.js @@ -147,4 +147,3 @@ describe('Robot Remote Library', function () { }); }); }); -