controller_subscriber.t:
- add checks to see if create/edit/delete labels show up and if they show
the correct text
Change-Id: I042201738176e76011783631b31f2db08b3e0b37
controller_rw_ruleset.t:
- add checks to see if create/edit/delete labels show up and if they show
the correct text
- improved xpath once
Change-Id: Id160f57269681a7e62c9015639da5f3672f81202
moved crash handler to Collection.pm, because copy pasting changes over
12 files is not fun =). also comparing differences in git is way easier
with this change
Change-Id: I0278bc4f85c6b6b2a1b56985c30b7100c0c93cd9
controller_reseller.t:
- add checks to see if create/edit/delete labels show up and if they show
the correct text
Change-Id: I2132be09750b384a8045ceb61dc4bc332b3971b4
controller_peering.t:
- add checks to see if create/edit/delete labels show up and if they show
the correct text
- check if outbound/inbound peering rule and peering server get properly
deleted
Change-Id: Iedb22a60c1ad4dbea1d476018263a28b3848ba74
controller_invoice.t:
- add checks to see if create/edit/delete labels show up and if they show
the correct text
Change-Id: I3468b491f418a66bfd3d8cbaec5892b9405f38eb
controller_invoice.t:
- add checks to see if create/edit/delete labels show up and if they show
the correct text
- removed unnecessary lines from the remove invoice template test
- edited one diag message which was showing the wrong thing
Change-Id: I0c978aa39089b8940e02424a633fb89305ed47de
- it will now detect more errors (errors with Oops! in the headline and
nginx erros)
- it prints more information now. (tab title and url)
- it looks nicer when some infos are not present (i.e when there is not
incident number or incident time availible)
- code looks nicer too
Change-Id: Id43c061e37fd2f6f18a82833892799e04a243dfe
- previously, selenium code was in its own subroutine due to a problem
how threading was done before, where it would execute files twice. since
the way how threading works has changed, this is not a problem anymore and
thus the code will be freed from its subroutine
- the code which checks if server or script errors occured was moved into
a new END block. try/catch silences error messages which is kinda suboptimal
when you need to debug issues
- this new END block will use a new variable called $run_ok to check if
the test run was fine or if something went wrong
- this should also make backporting of code much easier since git doesnt
like tabs at all
Change-Id: I6c6e61e05eabf442eff9f590168e4490393a5bb0
controller_emergency.t:
- add checks to see if create/edit/delete labels show up and if they show
the correct text
Change-Id: Id5aa3dab5ea37c7bb40c1f5b3ec562b147ea9eb2
Tests will now print some infos when they crash. If a server crash occured,
it will try to get the infos from the Sorry! page + ip of the server.
If it cannot detect server issues, it prints out timestamp and server ip.
Change-Id: I7be6f405503fd38eb334134294f45dff93a17ad5
controller_domain.t:
- add checks to see if create/delete labels show up and if the show the
correct text
- check error message when editing preference "concurrent_max"
- try to add a empty ip to preference "allowed_ips"
(not enabled for now, due to TT#61401)
Change-Id: Ie6990aaa1b245b7ebe0639e9ce8dc2d1b3ec1a07
controller_customer.t:
- add checks to see if create/delete labels show up and if the show the
correct text
Change-Id: If0cf0455b3d168721fcd88cfc6bb1dde98966bf3
controller_admin.t:
- add checks to see if create/delete labels show up and if the show the
correct text
Change-Id: Ie7520c518518624e3970d097b28dda93ed89b04b
controller_billing.t:
- add checks if create/delte labels show up and show the right text
- add a check if special date definition is deleted
Change-Id: Ie08c6640bab080184921af2c92f176856f5d16fb
controller_timeset.t:
- check error messages if input fields are emtpy
- check if entries are still there when you cancel deletion
- try to edit event dates and timesets to see if changes apply
- fill in invalid values on event creation to see if errors pop up
- disabled tests which cause problems currently due to bug TT#59866
Change-Id: Ib1bf186d4308f4efecd5a498e497bf7e655db678
controller_subscriber.t:
- check error messages if input fields are emtpy
- check if entries are still there when you cancel deletion
- try to edit subscriber profile sets/profiles and see if changes apply
Change-Id: I8e28cbf9580ea83c0722175736cbbb792c8aeff7
controller_rw_ruleset.t:
- check error messages if input fields are emtpy
- check details whem creating a rw_ruleset
- check if entries are still there when you cancel deletion
- check if invalid values in rule creating will be rejected
Change-Id: Id7c23cb4c338832fa8d806c4c540aa72a4b08ea4
controller_reseller.t:
- check error messages if input fields are emtpy
- try to change information everywhere
- check if entries are still there when you cancel deletion
Change-Id: I59b74608bb5c45b58fce9cb46d35faa6e1e7c79d
controller_peering.t:
- check error messages if input fields are emtpy
- try to change information everywhere
- check if entries are still there when you cancel deletion
- check if empty outbound peering rule gets created
Change-Id: I7a24d1752f644453464b2413c78c6b78c682d4a2
controller_ncos.t:
- check error messages if input fields are emtpy
- try to change information in ncos
- check if entries are still there when you cancel deletion
Change-Id: Icec3064c032d76ff7255ea35637d20ca0f8845d2
controller_subscriber.t:
- add a missing scroll_to_element, to prevent crashing if element is out
of screen
Change-Id: Iaa3b2007c17006ab2cb38d9209cedeade5f0e60d
controller_invoice.t:
- check error messages if input fields are emtpy
- try to change information in invoice templates
- check if entries are still there when you cancel deletion
Change-Id: I74e677bf3b74d5bd8e010692d0dd59325a58d31c
added tests to see if the entry is still here after the deletion has been
canceled to controller_admin.t and controller_billing.t
Change-Id: I62efb80edab1fc1f148863dbab7dfd0358a49073
controller_emergency.t:
- try to change information in both controller and mapping
- check for error messages if input fields are empty
- press "cancel" on first deletion and check if mapping/container is still
here
Change-Id: Ie89cb39a3ed80659ca503731a9f9bd13c6cb99d5
controller_domain.t:
- check if errors pop up when nothing is entered in the create window
- some more checks for allowed_ips
Change-Id: Ibb8e5199b5e444c68dfc8261659ca67287af3d8c
controller_admin.t:
- check if errors pop up when nothing is entered in the create window
- edit value "read-only" after creation"
- check if new admin is indeed in "read-only" mode
Change-Id: I63547f086e0aa061e372c44053f2abe8e16595e7
controller_customer.t:
- click save before entering anything, see if error messages pop up
- fill in invalid values, see if it gets rejected
- edit all elements once
Change-Id: I3e85a6b5774d08dabc918c0c826cbe428af9d88d
controller_billing.t:
- click save before entering anything, see if error messages pop up
- fill in invalid values, see if they get rejected
Change-Id: I790a2ce751a618332d3b6af9f7da73a2d06153a1
controller_domain.t:
- added fallback objects to every move_and_click(), so if the first try
fails, it can reset itself to another object and try again
Change-Id: If565ecc5489834754f7b3fe73491eb0753372780
testrunner:
- add option to launch a experimental test run, which will include all
tests including those which havent been added to the normal test plan
yet.
- this can be triggered by typing "experimental" or "exp" instead
of a filename.
runner.t:
- create experimental test plan if experimental arg is used.
Change-Id: I921664addbc0fa5c06c5d1a619baec82590eb8c0
controller_invoice.t:
- create a new invoice template
- check details
- create a new invoice
- add template and customer
- check details
- delete both
controller_reseller.t:
- moved invoice template test to controller_invoice.t
runner.t:
- added controller_invoice.t as an option to execute manually. it will be
added to the default test plan later when its more stable.
Change-Id: Iad373979fea68381e6e8d8ee140a4adb98861c32
Common.pm:
- create_customer() now requires a contact and billing profile
- will enable tests for invoices
controller_customer and controller_subscriber have been changed to use
create_customer() correctly
Change-Id: Icde5caf82205537f24dd2c6c6c1ee7476583e049
Common.pm:
- add new functions create_billing_profile() and delete_billing_profile()
- it now allows to specify a custom reseller, which will be important for
later tests
- these will be used for more tests in controller_customer
controller_billing.t
- adjusted code to use these new functions
Change-Id: Ied8bf9e579d77228dc1bc6c3ad7b0cdc0edb321a
controller_ncos.t:
- diasbled lnp tests, because some servers dont have any lnp carriers to
choose, which crashes the test
Change-Id: Ib6a169d33061e667eb3ae4e01bedd03332f72797
replaced every occurance of move_action + click with move_and_click. all
also have a fallback element if the click doesnt work first try.
Change-Id: I0489dacbda264d509c52016f259368666f3d5c15
runner.t:
- added controller_ncos.t to default test plan
- moved up controller_subscriber.t, so it gets executed earlier since it
is the longest test here
Change-Id: I875bd5cd1d1bab1bb03dad797abdc33058324ad2
controller_timeset.t:
- add a new timeset
- check details of timeset
- add a new event
- check date and description of event
- delete timeset/event
runner.t:
- added controller_timeset.t as an option to execute manually. it will be
added to the default test plan later when its more stable.
NOTE: it is not recommended to execute this file currently. some tests
will fail due to TT#59866
Change-Id: I31863a06725dabc73f7c1c31d1828af312fd2ba5
controller_subscriber.t:
- create a subscriber profile set and subscriber profile
- check details on both
- add subscriber to profile set
- check if subscriber was added to profile set
- delete subscriber profile set
Change-Id: I89c97b1da0e0e754d75b485a0ecebe54aad8495f
admin_login.t:
- removed diag line, else the xml file could have issues
- swapped return statements
runner.t:
- adjust for swapped return statements
Change-Id: I3f0dd0ed50d8fda2e18a15a30a881ad80a8760fe
controller_emergency.t:
- create emergency mapping & container
- check details of both
- add emergency container to domain
- enable emergency mode for domain
- delete everything
- check if deleted
runner.t:
- added controller_emergency.t as an option to execute manually. it will be
added to the default test plan later when its more stable.
Change-Id: I77198ae328525a81042f67a7974614a90a0b4b27
testrunner:
- fix so that *.t doesnt select every file in directory, even ones who are
not added to the default test plan yet.
Change-Id: I6ed9057fed87244b7968cdc05f60825941675579
contoller_ncos.t:
- create a NCOS level
- create NCOS level pattern
- create LNP carrier
- check details from all of them
- delete NCOS level, LNP carrier and NCOS level pattern
runner.t:
- added controller_ncos.t as an option to execute manually. it will be added
to default test plan later when its more stable and more complete
Change-Id: Ib312be843c89fc9e29a1987f1ebe6a0925e917e9
Functions.pm:
- add create_driver(). It will check which port can be used and returns a
webdriver element.
testrunner:
- start 4 instances of geckodriver instead of 1
- start runner.t by default. it is still possible to run other files if
needed.
runner.t will first run a test login to see if the server is here. If login
doesnt work, it will abort the test.
runner.t will then exectute the tests (max. 4 in parallel). Test files have
been modified accordingly to either work with runner.t or to execute
independently.
Change-Id: I628ea82ad786a6ebd713747fe07dda45a538a01c
controller_domain.t:
- enable opus mono and stereo transcoding
- change bitrate
- check if settings are applied
This test could be applied to controller_peering and controller_subscriber
too, but it will stay here for now.
Change-Id: I94d70c1ce380228300a37d9c62d7bb078e663b7e
controller_subscriber.t:
- change subscriber language
- check if correct language has been seleceted
Change-Id: I0d1a12c29a4433f4791727667fdc878848c95980
controller_subscriber.t:
- create a new source set
- select new source set for call-forward
- check if source set is beeing used
Change-Id: Iee17dbfacf828c882268be3e2c3b001440bdc726
controller_subscriber.t:
- add tests for block lists
- enable checkboxes and check if enabled
- add entries to the list and check if entries are added
- disable entry and check if it was disabled
Change-Id: I08d52852088b1304d7361e36c8008050f04edcc4
controller_billing.t:
- replace codeblock for clicking on button "Edit" on column Wednesday.
Should speed up the test a little bit.
Change-Id: Icbb4e2d53552c42ec32dd5f5cf97648932992cc0
FirefoxExtensions.pm:
- Add optional fallback parameter. This can be used to move the
mouse somewhere else before moving it to the actual location,
preventing crashes if ajax messes with button visibility again.
Change-Id: I300cccbcc4b99335069796f1d8f56b8fb92bb2b0
controller_peering.t:
- Test will now search for the default customer instead of just selecting
one. Should fix random crash that occured since today
Change-Id: I1ff0affc2837033618240e7c22d334a2632a2f13
controller_customer.t:
- add more tests for checking entries
- use cleaner xpath
- clean up old code
Change-Id: I691fe00639edf95019b64296255f7fa9ebc1f61b
move_and_click automatically moves the pointer to the location and tries to
click it. It is also covered in a try/catch block, so it wont crash if
something goes wrong. should FINALLY fix fraud limits crashes and call
forward crashes.
Change-Id: I50e8b8f4f46b31afbd82f66842bf4f3cda966b77
Common.pm:
- Edit functions to enable testing the cancel button on delete dialogs
Every file where generation of data is handled by a function in Common.pm
either got this test or recieved improvments.
Change-Id: I4fa4d0bb57c3d32f980d7ea540acb38ad12c2b42
controller_customer.t:
- a few changes in xpaths, with the intention to finally fix crashing
fraud limits tests
Change-Id: Iefb9565932ed35c5465673128466fba0273adb84
contoller_subscriber.t:
- create a subscriber
- try to add a call-forward (using b and destination sets)
- delete subscriber
- check if subscriber has been deleted/created
contoller_customer.t:
- subscriber checks have been moved to controller_subscriber.t
Change-Id: Ia61b1de16162ad12a26a3de189d14e5431fd4eae
Common.pm:
- Add create/delete customer() functions. Will allow us to extend stuff,
especially when testing pro versions.
- create_customer has a new argument. If $pbx == 1, it will create a customer
for pbx tests
controller_customer.t:
- Edited to use new functions,
Change-Id: I834a9d92d726f7ca90f223c77dce1f096916016d
controller_peering.t:
- Use a unique name for peering server. This will prevent crashing tests
if a previous peering test failed and/or peering server wasnt deleted.
Change-Id: If49710ae0803d9a8d140ab9a6a38bec38533f96e
controller_domain.t:
- Enter value (valid and invalid) into allowed_ips and check if the value
has been applied
Change-Id: Ic8194da5c8d2b6f0b8eb02cf0d5f98336fb68a3c
controller_admin.t:
- tests if admin is added and checks if said admin can log in.
- deletes admin after test
Common.pm:
- extended login_ok(), it can now use any user or password. If none is
specified, it will use the default username/pw: administrator.
Change-Id: I89a332176a58fdf6a0ad31495f88633c373a39db
controller_customer.t:
- clicking on fraud limits is now done first instead of scrolling to fraud
limits. This is how it is done everywhere else, so hopefully it fixes it.
Change-Id: I51559dc5f15985d00b2ce7fd930c28ac39cb7428
controller_peering.t:
- rewrite said code block to allow use of better xpaths and (hopefully)
make it more reliable.
Change-Id: I1a398e3f0262399f8fba9ce8c6cdd94c21b076d7
Changed how names get generated, because it happens that we generate
something like test9123 and later we create test9 that these two names
will conflict each other when it comes to searching.
Change-Id: I5109e69c9f5b1bd8bcf49be49af535f93a8edbf2
controller_rw_ruleset.t:
- changed reorder rewrite rules test, newly created rule will no longer be
deleted.
- Removed temporarly because somehow xpath behaves very weirdly when
trying to delete it, causing it to crash pretty often on jenkins.
Change-Id: I23573f67cd7e2681035d30784dcc91c4032ff218
Moving function login_ok() from FirefoxExtensions.pm to Collection.pm.
FirefoxExtensions.pm should be used to store functions which make
programming stuff easier.
Common.pm should be used to store commonly used selenium routines.
Edited all files accordingly to work with this change.
Change-Id: I00ece7de88f7677665c5b8b87ce1e60be9c5854d
controller_rw_ruleset.t:
- create test domain with test reseller.
- try to add ruleset to domain.
- check if ruleset was added.
Change-Id: I4a1ac66ed33cc15ccfbcf75491a44bb836a24676
controller_peering.t
- replaced table ids with "table", since table ids are different in Pro and
CE versions.
Change-Id: I2b914f7c69edfc29b05e7d84c4d41e6587a26210
controller_rw_ruleset.t:
- add rule to newly created ruleset.
- check if rule was correctly added.
Change-Id: I6f476dde4cd9c6cff6768d88662f8fe6dbe70af8
controller_peering.t:
- Add tests to add peer_auth_user, peer_auth_pass and peer_auth_realm.
- check if said entrys have been created
Change-Id: I052decf1a1a07346ffa4d66ec06e2ef10f987cde
controller_billing.t:
- Add Garbage text search when to the billing page to (hopefully) prevent
"stale element exception" or "element not interactable" exceptions.
Change-Id: I017d8ab0e09b7425307e1aca686ad351651a00cc
controller_peering.t:
- Made delete routine for removing peering servers/groups simpler and
hopefully more reliable.
Change-Id: Ice0854f1953ca017e5db09e4ad0288e21a73218d
controller_billing.t:
- Billing profile now gets deleted at the end.
- Check if billing profile is deleted.
Change-Id: Ia4dcbb8498f4482fe9b76568308314ceecb95d99
controller_billing.t:
- Add a $billingname at the beginning of the test. This will generate the
name "testingprofile + 5 random numbers". Will be used to properly check
if a peering group has been created/deleted.
- Rewrite create, check and edited other code to use that new variable.
Change-Id: Id9403a356b3ceb3c67e51cc3735b75ba90511a7a
controller_peering.t:
- Add a $groupname at the beginning of the test. This will generate the
name "testinggroup + 5 random numbers". Will be used to properly check
if a peering group has been created/deleted.
- Rewrite create, check and delete code to use that new variable.
Change-Id: I16489290be9780de2f457588767344080cf71b1e
controller_customer.t:
- change move_actions to move mouse over invisible buttons instead of
some element in column.
- used cleaner xpath.
Change-Id: I69b56f5e024b8392310b28490c37654e3445e620
controller_reseller.t:
- change move_actions to move mouse over invisible buttons instead of
some element in column.
- used cleaner xpath.
Change-Id: Ibb7adda18eda2dd0707e01b15c10615ccb71c8fd
controller_customer.t:
- check for PBX enviroment variable. If set to 1, it will run additional
tests for PBX enabled systems. If nothing or 0, it will run without these.
Change-Id: I95236f051b212d63cf6075cdaebd05319279a548
controller_reseller.t:
- Is now creating a new Invoice Template.
- Will check if Invoice Template has been created.
Change-Id: I0e49bfdb1d3ec5da9818a90aa397d993147bceac
controller_customer.t:
- Edited code blocks around clicking invisible buttons. Should work
more reliable now.
- replaced find_element with find_element_by_css when checking for
empty tables. Should prevent crashing.
Change-Id: Ifa7e8f85a1eec17e530032660781fa5840685edd
Common.pm:
- Added a new argument $cancel to delete_reseller() and
delete_reseller_contracts(), so it clicks on cancel instead of ok.
- Added a second move_action(), its needed because if mouse pointer is at
the exact same location as before, the buttons wont show up.
controller_reseller.t:
- implement checks to see if reseller and contract are still there if you
press cancel.
Change-Id: Id6a097314cc2fc025dac71c085c6adef98414890
controller_reseller.t:
- Modified stuff so instead of taking the fist 'active' entry,
it now uses our new reseller.
Change-Id: I0d10158ff025e6fcab791acc445aca822208f675
Common.pm:
- delete_reseller() will delete our newly created reseller.
- delete_reseller_contract() will do the same for the contract.
controller_reseller.t:
- added both new functions.
- check if reseller is actually deleted.
- check if contract is actually deleted.
Change-Id: Ic24ca53b76264f5e91e8030f47930abcc46dc11c
Common.pm:
- add create_reseller_contract(). This will create a contract for use in
create_reseller().
- add create_reseller() to really test creating a reseller.
controller_reseller.t:
- included new functions.
Change-Id: I78bcddba3dd7f4aa6949ac88ae3cc68296194b45
controller_reseller.t:
- Test will now 'create' a reseller first, then it will check the search.
(It doesnt create anything right now...)
- Searching and verifying garbage text improved.
Change-Id: Id3b9a3a12cb62df9ed5163aee86fa6a97995977e
controller_billing.t:
- Made garbage search call much simpler.
- Replace find_element with find_element_by_css, prevents crashing if
garbage text search didnt work.
- Added new ok() tests for find_element_by_css.
- Removed commented lines
Change-Id: I42cf670c47cdc22db9ba1c8079fac3e3bb5147c8
controller_domain.t:
- All ok() calls should now have correct text to print.
- Minor formatting changes.
Change-Id: I0f74039ef32b488f19b29be726102150338bb775
controller_customer.t:
- Add better check for empty table. Should prevent stale_element_exception
- Test now adds and deletes its own domain. Enables proper search testing
Change-Id: I6eed8ce85d2b118c825cd73ff46c70a3f737a587
Common.pm:
- add function delete_domain() for clean up after test run
controller_domain.t:
- implement delete_domain()
Change-Id: Ice5e902af9819ffeb683cfe6a3f86fe523d55e87
Some selenium tests depend on each other.
Example: controller_customer.t doesnt work, if controller_domain.t isnt
executed beforehand.
Common.pm is used so that selenium tests are more independent. Right now,
it contains code to create a domain.
Very useful for multithreading later on.
Change-Id: If01c7cd4d17ef66771bc64516088d3f57b02bf78
controller_customer.t:
- removing a probably unnecessary sleep call that would trigger if either
chrome or phantomjs are used.
Change-Id: I2758c2756eb9f29fcbdcfacbce9b02faef87e056
Test was crashing, because of invisible button madness.
Now it will move the cursor to the column it wants to delete.
Button shows up and is clickable now.
Change-Id: I59aa27d7ef2fe06a6caa28620341363ff99f1042
Added wait_for_text() to wait until a text appears.
Can also be used to check if text is here.
It will return true or false to be used in further testing
Change-Id: Ib28636b7757a5312652da86d3b43b9fd8547522b
XML files generated by prove will contain the time we spend in every
test case, it allows us profile our tests and fix the most slop parts.
Change-Id: I965af2d95f57d8975613da0f46ce8abf1be4c114
Jenkins uses wrapper jenkins_docker_run which will mask exit code
anyway and this is what we want currently:
we need always zero exit code here on Jenkins.
Jenkins will detect errors in produced artifacts (XML files) if any
as a result the Jenkins job will be "yellow" instead of "red".
Change-Id: I249fcde9103ee25e6798fcb835ee4a408f8f0f57
We have it already inside t/selenium/testrunner, let's remove it here
to prevent duplicate and simplify the script.
Change-Id: I184642ce18c04cd30ea1c4a8a94a4ee1f8fdac99
testrunner:
- removed -m from local Perl launch options. this would cause diag messages
to only print when the script is finished. Without it we can see in
realtime where scripts get stuck. still used for Jenkins
- can now specify which test cases should be executed in launch options.
- code cleanups
jenkins_docker_run:
- remove hardcoded old parameters as Jenkins job path all the necessary
parameters already in the proper order, we just need to proxy them into
the shell script 'testrunner' to run it under the user 'selenium'.
Change-Id: Icaced3c3ce65cd23f3037517296e49afce4a9414
controller_customer.t:
- cleaned up some ok statements to see what acutally is going on.
- Added check for adding subscribers to a customer
Change-Id: I49a8f8e671472a7875ccc6d84d1fae50691a62ae
Previously, controller_domain.t would skip the test because
there were obviously no domains after compile.
New version adds a domain and checks if the search works.
Change-Id: I8e8bad9725d253a7c578b50beded5807b5d452b1
It should help to catch the random fail in the test:
> # Go to Customers page
> # Create a Customer
> Can't use string ("no such element") as a HASH ref while "strict refs" in use at /home/selenium/Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm line 684.
> at /home/selenium/Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm line 655.
> # Tests were run but no plan was declared and done_testing() was not seen.
> # Looks like your test exited with 255 just after 5.
> Dubious, test returned 255 (wstat 65280, 0xff00)
Change-Id: I3094500b75590a284d5f28c987cadf21eb95033d
The full issue description you can find in commit message
a9399b1efd.
In short, Selenium can't press on "Edit" button because
it is being hidden on every AJAX request to backend.
(Un)fortunately the previous fix opened new ngcp-panel JS
issue reported as TT#50005: JS performs several AJAX requests
to backend and the second request still cause the same problem
as previous caused the first one.
Luckily JS performs only one request to backend on the page load.
And starts doubling them when we enter something into "filter".
As a result, the previous commit has been reverted and new approach
is proposed here: we will just wait data appearance in "Dates"
(which means the first AJAX request is finished).
Change-Id: If991af70e1ad1b00b04e4118c0b5f52b2d636eba
The previous variable name didn't represent the real code context.
The changes were initially part of commit a9399b1efd and
were extracted to separate commit as initial commit had been
reverted in commit 0601b821006f.
Change-Id: Idf06a06b60498ec5df7a9472aa38413997dc23cb
The fix here didn't work well because another ngcp-panel issue has been
noticed and reported as TT#50005, the second AJAX request aborts Selenium
test by hiding "Edit" button. The better approach is follow.
This reverts commit a9399b1efd.
Change-Id: Icf6251261f0cbc12ef4e819b3352dc3ebf7c4246
Jenkins reports time-2-time issue on 'Peering Servers' page:
> # Delete the previously created Peering Rule
> ok 14
> Can't use string ("no such element") as a HASH ref while "strict refs" in use at /home/selenium/Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm line 684.
> at /home/selenium/Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm line 655.
> # Tests were run but no plan was declared and done_testing() was not seen.
> # Looks like your test exited with 255 just after 14.
It was caused by slow AJAX loading here.
The button 'Delete' was not yet loaded and
we were just do 'sleep 1' and were trying to press it.
How we are clearly waiting for the record to be loaded
before trying to delete it.
Change-Id: Ia20cb427262e9c973ce4853d3ebb17438780afd0
It was old floating issue which randomly failed the test and
jenkins job ngcp-panel-test-selenium-docker became often yellow.
The problem here was in two facts:
- 'Edit' button available with mouseover only
- there is AJAX on this page for filtering 'Dates' records.
Historically we have no ability to wait for all AJAX loadings.
When Selenium moved mouse over Edit column to press it,
AJAX can be finished and removed "Processing..." label
from "Dates" field. It cause loosing mouseover from "Edit"
button and button is hidden causing "element not interactable":
> # Click 'Edit' button for element 'Wednesday'
> Can't use string ("element not interactable") as a HASH ref while "strict refs" in use at /home/selenium/Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm line 684.
> at /home/selenium/Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm line 655.
> # Tests were run but no plan was declared and done_testing() was not seen.
> # Looks like your test exited with 255 just after 27.
It has been workarounded here as we cannot wait for AJAX.
We are creating fake query for "Dates" (searching "thisshouldnotexist")
and waiting until the table "Dates" has no search results records.
It means AJAX has finished and we can continue with the test.
Also here I have renamed confusing button from 'edit' to 'delete',
as we press delete. And we have to clean previous search 'thisshouldnotexist'
with proper '2008-02-28' which we want to delete.
Change-Id: I55af32991687e82c3e57b15c066e772ff0b77123
It will give Ajax enough time to load 'Edit' button,
otherwise we have some mystery which randomly happens
when Jenkins tests VMs on Google Cloud:
> # Edit Wednesday
> ok 26
> # Move mouse over 'Weekdays' row to make 'Edit' button available
> # Find 'Edit' button for element 'Wednesday'
> ok 27
> # Click 'Edit' button for element 'Wednesday'
> Can't use string ("element not interactable") as a HASH ref while "strict refs" in use at /home/selenium/Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm line 684.
> at /home/selenium/Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm line 655.
> # Tests were run but no plan was declared and done_testing() was not seen.
> # Looks like your test exited with 255 just after 27.
Locally it is not reproducible, also VM on Proxmox has
no such issues as well. I spend too much time here trying
to find the root of the issue, maybe Firefox version
we are currently using has some issues here. Give up, sleep 1.
Change-Id: I168270f6f6d25d8bdccfe6a40b2bc63aa0c5068e
The old code didn't work as expected, as RC receives
'tee' exit code (which is zero in most of the cases)
instead of 'prove' exit code.
The new code gets 'prove' exit code and it changes nothing
at the end, as we just print it into debug message.
Anyway Jenkins operates with JUnit output to detect issues.
It is better to have 'correct' code here to
prevent misunderstanding in the future.
Change-Id: I09f399813179590a67c25509f310c91f7e297f3a
The 'Edit' button appears only after mouse-over event,
and we might have race conditions here when we are trying
to click on not-yet available/accessible button causing:
> Can't use string ("element not interactable")...
Let's wait for button and then proceed with 'click()',
it is the behaviour we use everywhere, while it was missing here.
Also improve debug messages here for easier debug next time.
Change-Id: Iae955bb3f937da6b5c10369bc49f6dd75611dc87
We can replace the apply usage with map plus a returning s///.
This also fixes a hidden bug with the liblist-moreutils-perl dependency
missing from debian/control, being indirectly pulled by some other
dependency, while an implementation detail.
Change-Id: Ibfc7b362ad77c4b202d93cf71774c40623503f14
adapt PERL5LIB in a way, so that jenkins is also able to find it
(it uses /home/selenium/jenkins_docker_run)
Change-Id: I2d5ab35c77abd2dda9f676768da8cd6a36c4ddfb
Selenium::Remote::Driver v1.20 is the latest upstream release and
is missing some patches/PRs that we need for selenium tests of
ngcp-panel. Packaging the git version properly in the Debian way
is hard because of the way upsteam handles releases with separate
branches (one of them even being out-of-date, sigh). So instead
let's use a tarball from their latest git version until we see a
v.1.21 release.
Symlinking the geckodriver binary to /usr/bin/geckodriver addresses:
| Unable to find the geckodriver binary in your $PATH. at /home/selenium/Selenium-Remote-Driver/lib/Selenium/CanStartBinary/FindBinary.pm line 66.
Change-Id: I8ddf3c76a008ce5b0aa67b62154a9614f90cb659
all selenium tests are working with newest geckodriver (0.18.0) and patched S:R:D
issues:
- setting the window size: not urgent
- the unsupported move_to: fixed (new move_action)
- setting the implicit wait timeout: fixed upstream in S:R:D
Change-Id: Ic5b52cd866f4fd93682d67a4fd8a76ec54ea70cf
This package update includes further patches to address Selenium
test failures with geckodriver/Firefox:
* move_to: 4d0b8e7255
* timeouts: 2c55f3dcb9
Change-Id: I587f32230ce7cc8d912e052a93fb7d31fd7c90c1
Which confuses developers which are debugging failed tests,
as details like below are not a part of XML Jenkins displays on a WEB:
> # Failed test 'create test customer w/o profile package'
> # at t/api-rest/api-balanceintervals.t line 1578.
> # got: '500'
> # expected: '201'
> Use of uninitialized value in concatenation (.) or string at t/api-rest/api-balanceintervals.t line 1580.
> Thread 4 terminated abnormally: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE HTML>\n<!-...") at /usr/share/perl5/JSON.pm line 171.
'man prove' says:
> -m, --merge Merge test scripts' STDERR with their STDOUT.
Change-Id: I945d4d8867fc9c061f96d067be14125af7cc5a46
An unintended docker image rebuild of
ngcp-panel-tests-selenium-jessie resulted in failures with
our selenium tests. A series of problems started:
1) Updating the Selenium version resulted in an error message by
Selenium, requesting the geckodriver binary
(https://github.com/mozilla/geckodriver - being a proxy for using
W3C WebDriver-compatible clients to interact with Gecko-based
browsers). So Selenium versions >=3 depend on geckodriver.
2) Recent versions of Selenium also depend on Java >=8, available
only via backports for jessie. Since we avoid usage of backports
as much as possible and we'd have to upgrade once anyway we
decided to base our fresh docker image on stretch.
3) We have to backport Selenium::Remote::Driver (Debian package
libselenium-remote-driver-perl) for stretch (since it's not
available in Debian, even though there's an ITP:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839569). It has
a bug which prevents its usage for us:
https://github.com/gempesaw/Selenium-Remote-Driver/issues/319 ->
We fixed the problem via our own backport and submitted a PR
towards upstream:
https://github.com/gempesaw/Selenium-Remote-Driver/pull/321
4) Firefox from Debian/stretch (firefox-esr 52.2.0esr-1~deb9u1)
fails with geckodriver e.g. in click events, the current Firefox
version 54 works fine though. So instead install only the
relevant runtime packages from Debian and use the Firefox version
v54 from upstream.
Resulting changes:
* switch from Debian/jessie to Debian/stretch
* no longer use selenium at all but only geckodriver instead
(recent versions of selenium depend on geckodriver anyway)
* do all package/file changes in /home/selenium/ (to clearly
see what's from us/docker and what are actual temporary files)
* testrunner related changes:
- invoke vncserver with `-localhost no` option to accept
VNC connections not only from localhost only
- adjust vncserver process name for Xvnc4->Xtigervnc switch
- start geckodriver instead of selenium
* package related changes:
- backported libtest-pretty-perl (v0.32)
- backported libselenium-remote-driver-perl (v1.20)
- add curl to package list since it's handy for debugging test
failures, like e.g. `curl -X POST localhost:4444/session --data {}`
- add procps to have pkill binary available inside testrunner
- openjdk/java is no longer needed since we don't depend on selenium anymore
- vnc4server is now a transitional package for
tigervnc-standalone-server, so directly depend on it
Change-Id: I607ffd4fce80f9e84b76c3c7a19824819ac4503c
File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:
| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
See https://github.com/docker/docker/issues/18355 and
https://github.com/docker/docker/pull/19490 for details.
Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a
The jenkins_docker_run script is invoked from Jenkins
when running the docker image. The testrunner script
now takes two additional arguments to support sharing
test results via another docker volume and to control
output format ("pretty" as default but junit for usage
on Jenkins).
While at it fix some quoting issue identified by shellcheck.
Change-Id: Ided716e0e0ca23751b0ee2961f3e301acb80128d
This provides a setup to run ngcp-panel tests against
selenium-server using docker. It's based on Debian/jessie and
assumes are reachable NGCP system for running the tests against
(e.g. via `vagrant up ce-trunk`). For usage instructions refer
to the Dockerfile.
NOTE: replacing 'jessie' with 'wheezy' in the Dockerfile provides
a setup based on Debian/wheezy.
Change-Id: I79ca4d44c3a7c454f99148889d4b0d075a79e82b
use strict and warnings
therefore forbid unquoted strings
factor out initialisation
screenshot functionality is implemented upstream
Change-Id: I18a0dcc7a6418dc9fd2fa64d367ae226018a7645