webrtc / KITE

KITE is a test engine designed to test WebRTC interoperability across browsers
Apache License 2.0
469 stars 126 forks source link

js tests are broken #156

Closed lindishabani closed 4 years ago

lindishabani commented 4 years ago

When i run js tests it shows this error:

2020-09-09 12:52:23,428 INFO  - [Amwell.js_0 ] TypeError: Cannot read property 'toLocaleUpperCase' of undefined
 2020-09-09 12:52:23,428 INFO  - [Amwell.js_0 ]     at createWebDriver (/home/lind/solaborate.com/KITE/KITE-Amwell-Test/js/node_modules/kite-common/wdmgmt/WebDriverFactory.js:38:29)
 2020-09-09 12:52:23,429 INFO  - [Amwell.js_0 ]     at Object.getDriver (/home/lind/solaborate.com/KITE/KITE-Amwell-Test/js/node_modules/kite-common/wdmgmt/WebDriverFactory.js:94:25)
 2020-09-09 12:52:23,429 INFO  - [Amwell.js_0 ]     at Amwell.testScript (/home/lind/solaborate.com/KITE/KITE-Amwell-Test/js/Amwell.js:13:44)
 2020-09-09 12:52:23,429 INFO  - [Amwell.js_0 ]     at Amwell.run (/home/lind/solaborate.com/KITE/KITE-Amwell-Test/js/node_modules/kite-common/util/KiteBaseTest.js:106:18)
 2020-09-09 12:52:23,429 INFO  - [Amwell.js_0 ]     at /home/lind/solaborate.com/KITE/KITE-Amwell-Test/js/Amwell.js:35:14
 2020-09-09 12:52:23,429 INFO  - [Amwell.js_0 ] TypeError: Cannot read property 'quit' of undefined
 2020-09-09 12:52:23,429 INFO  - [Amwell.js_0 ]     at Amwell.testScript (/home/lind/solaborate.com/KITE/KITE-Amwell-Test/js/Amwell.js:25:25)
 2020-09-09 12:52:23,431 INFO  - [Amwell.js_0 ] wrote all data to file

but when i run java test it works fine

namvuCosmo commented 4 years ago

Hello,

Can you upload your config file here please?

Also, please list the steps to reproduce this error.

lindishabani commented 4 years ago

Hello,

Steps to this error:

The js.VideoCall.config.json is this:

{
  "name": "VideoCall %ts",
  "grids": [
    {
      "type": "local",
      "url": "http://localhost:4444/wd/hub"
    }
  ],
  "tests": [
    {
      "name": "VideoCall Test %ts",
      "tupleSize": 1,
      "description": "Amwell test description",
      "testImpl": "VideoCall.js",
      "payload" : {
        "url": "https://www.google.com/",
        "testTimeout": 60,
        "takeScreenshotForEachTest": true,
        "meetingDuration": 30,
        "users": [

        ]
      }
    }
  ],
  "clients": [
    {
      "browserName": "chrome",
      "platform": "localhost"
    },
    {
      "browserName": "firefox",
      "platform": "localhost"
    }
  ]
}

I also think it is worth mentioning that other tests like KITE-Example-Test and KITE-AppRTC-Test work with both js and java.

After running the test also along with the error indicates that the tests passed:

 2020-09-10 09:56:59,057 INFO  - execute(DEFAULT) completed.
 2020-09-10 09:56:59,060 INFO  - Test PASSED
 2020-09-10 09:56:59,060 INFO  - Matrix runner at last phase, ending. 
 2020-09-10 09:56:59,069 WARN  - Done! All test cases have passed!
 2020-09-10 09:56:59,069 INFO  - shutdownExecutors() done.
namvuCosmo commented 4 years ago

Thanks, we'll try to reproduce this and get back to you when we have some time.

Even though KITE has some support for js test, the library and report/logging for it is really limited, our focus is mostly on the Java part. We will try to update the js part as well, but it might take time. If you can, consider writing the test with our Java framework for better support.

lindishabani commented 4 years ago

thank you, I found a way to make javascript tests work. The solution was to copy node_modules from an existing test that works and paste into your tests.

namvuCosmo commented 4 years ago

Oh I see, probably I haven't update the kite-common library's version in the init package. It should be "kite-common": "^0.1.15" in the package.json file.

I'll update it in the next push. Thanks for pointing this out.

lindishabani commented 4 years ago

Happy to help you