vendredi 30 octobre 2015

Is the Intern really really able to run on any Selenium service?

I've written some functional tests for the Intern, which supposedly should work on SauceLabs, BrowserStack, TestingBot, or my own Selenium grid.

The same code doesn't seem to work on all services though. I initially got the functional tests working on SauceLabs, so I'm using that service as my "base", so to speak.

On BrowserStack, the tests appeared to fail because the commands were executing too quickly. For example, I am using .pressKeys('TEST\nIN\nPROGRESS\n'), where \n is supposed to execute javascript on the page to turn the previous text into a tag (like the SO tags for this question: [intern] [javascript] [testing]).

That command should result in the following:

[TEST] [IN] [PROGRESS]

but instead results in

[TESTIN] [PROGRESS]

causing my assertions to fail. Changing the pressKeys command to

.pressKeys('TEST\n')
.sleep(500)
.pressKeys('IN\n')
.sleep(500)
.pressKeys('PROGRESS\n')

did not solve the issue. The test would pass / fail inconsistently, with the tags sometimes coming out as [TEST] [IN] [PROGRESS], and sometimes as [TESTIN] [PROGRESS].

Another example is that it wouldn't always wait for the next page to load when I .click() on a link, even with a .sleep() command after.

With regards to TestingBot, the application flat-out failed to upload files, and I could not for the life of me figure out how to enable the file_watcher service required to do so. They have a file upload example here, but I don't know how to configure the Intern to do this for me.

Isn't the Intern supposed to take care of these differences in the cloud providers for the tests?

Is there some standardized way of writing my tests in the Intern so that I can change my cloud testing provider without changing the tests themselves?

Aucun commentaire:

Enregistrer un commentaire