mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 07:16:39 +00:00
60 lines
3.2 KiB
Plaintext
60 lines
3.2 KiB
Plaintext
E2e Protractor Tests.
|
|
|
|
1. Instructions:
|
|
|
|
1. ctrl.sh: contains start up, stop, and run scripts.
|
|
* May need to modify DIRECTORY variable to reflect location of MMAP. *
|
|
-start: This will start 3 processes: MMAP, webdriver, and elastic search, all 3 are needed.
|
|
-run: run will run the protractor tests. (protractor conf.js)
|
|
-stop: stop will kill the 3 process started by the start command.
|
|
|
|
2. example:
|
|
cd protractor
|
|
./ctrl.sh start
|
|
./ctrl.sh run
|
|
*Note: multiple test can be run at this point.
|
|
./ctrl.sh stop
|
|
|
|
2. Directory Hierachy:
|
|
|
|
-protractor: base directory
|
|
-common: contains prototype javascript functions that all other tests use.
|
|
-Buttons: common prototype functions related to enter fullscreen
|
|
-CreateItem: common prototype functions related to creating an item
|
|
-drag: common functions to test drag and drop.
|
|
-editItem: common functions used to test edit functionality.
|
|
-RightMenu: common functions for right click menu(remove).
|
|
-create
|
|
-e2e tests that creates the specified object.
|
|
-delete
|
|
-e2e tests that removes the specified object
|
|
-logs
|
|
-ctrl.sh redirects console output of MMAP, webdriver and elastic search and pipes them to log files.
|
|
-UI
|
|
-Contains tests that test the UI(drag drop, fullscreen, info bubble)
|
|
-conf.js:
|
|
-protractor config file. Explained below
|
|
|
|
|
|
3. Conf.js
|
|
Conf.js is used by protractor to setup and execute the tests.
|
|
-allScriptsTimeout: gives more time for protractor to synchronize with the page.
|
|
-jasmineNodeOpts: Protractor uses jasmine for the tests and jasmine has a default time out 30 seconds
|
|
per "it" test. Changed to maximume allowed time 360000 ms
|
|
-seleniumAddress: Protractor uses a Selenium server as a "proxy" between the test scripts and the browser
|
|
driver. A stand a lone version comes with protractor and to run use "webdriver-manager"
|
|
default address is: http://localhost:4444/wd/hub.
|
|
-specs[]: Is an array of files. Each File should have a "describe, it" test to be executed by protractor.
|
|
-capabilities: Tells protractor what browser to use and any browser arguments.
|
|
|
|
4. StressTest:
|
|
Tests that are used to test for memory leaks. You can use the new tab option on WARP and then open the
|
|
timeline in the new tab during the browser.sleep(). Once the test is do the browser will pause and you can
|
|
look a the timeline results in the new tab.
|
|
NOTE: Cannot open chrome dev tools on same tab as the test are run on. Protractor uses the dev tools to
|
|
exectute the tests.
|
|
|
|
-StressTest will create and delete folders.
|
|
-StressTestBubble.js: creates manny bubbles.
|
|
(Delay variable in InfoGesture.js was changed to 0)
|
|
|