Get help with testing, discuss unit testing strategies etc.


Post by klodoma »

Hi, continuing my evaluation, I hit a potential issue.

I have the following use-case: I want to execute the same test-file on different builds (for example: extjs classic and modern). The test-code is the same for both cases. I am doing this to avoid code duplication. As you see in the config the hostPageUrl is different, but source test files are the same.

See this config:
Screenshot_370.png
Screenshot_370.png (46.06 KiB) Viewed 1685 times
Problem 1:
In front-end the 2 files are displayed either in classic or modern tree but not in both. If you expand the KeyPad node you will see the files and they will disappear in the other node. See screenshots.
Screenshot_371.png
Screenshot_371.png (34.53 KiB) Viewed 1685 times
Screenshot_372.png
Screenshot_372.png (43.74 KiB) Viewed 1685 times

Problem 2:

If I try to execute the tests with webdriver I get the error that the files are already processed:
[PASS]  src/view/keypad/KeyPadAmount.t.js
[PASS]  src/view/keypad/KeyPadNumber.t.js
Caught unhandled rejection:  Error: Element already processedsrc/view/keypad/KeyPadAmount.t.js
    at Object.endProgress (C:\devkit\Siesta\siesta-5.2.3-trial\bin\siesta-launcher-all.js:239:513)
    at Object.b [as endProgress] (C:\devkit\Siesta\siesta-5.2.3-trial\bin\siesta-launcher-all.js:27:357)
    at Object.consumeTestResult (C:\devkit\Siesta\siesta-5.2.3-trial\bin\siesta-launcher-all.js:284:449)
Any idea how to solve such a situation without duplicating the test files?

Post by mats »

Yes, this is a known limitation. We just append query string ourselves to make id unique (?foo=1) etc. Please try this!

Post by klodoma »

mats wrote: Mon Jun 10, 2019 5:44 pm We just append query string ourselves to make id unique (?foo=1) etc.
Yes, this does the trick! Thanks!

Post Reply