Source code for the platform of https://platform.ubora-biomedical.org/
The current maintainer of the source code is Kaspar Kallas.
Feel free to submit a pull request or create a new issue. You can contact me for guidance email@example.com
Simplest way to run UBORA locally (updated 21 December 2018):
- That's it! Navigate to "https://localhost:5001" on your browser.
NOTE: Don't forget to
git pull latest changes! :)
Running Functional tests locally:
- You need Visual Studio Code installed
- You need Docker installed
- Open up project in VS Code.
- Open up the folder you have Ubora\src in TERMINAL in VS Code.
- Run the tests using
docker-compose -f docker-compose.ci.functional-tests.yml up
If you have errors do one of the following:
docker-compose -f docker-compose.ci.functional-tests.yml downand run tests again
docker rm -f postgresand run tests again
- If nothing works Restarting the computer is always a good option
Getting the latest changes to the test environment when you are running tests locally you need to build them locally in VS Code using these two commands:
docker-compose -f src\docker-compose.ci.build.yml upin folder \ubora (Repo) in VS Code
docker-compose -f docker-compose.ci.functional-tests.yml buildin folder \ubora\src in VS Code
If you have this error:
standard_init_linux.go:187: exec user process caused "no such file or directory"
Then do the following:
Open git bash in Ubora repo folder and insert those three commands:
Currently, there exists a predefined
System Administrator account:
firstname.lastname@example.org ChangeMe123! email@example.com ChangeMe123! firstname.lastname@example.org ChangeMe123!
Developing functional tests (or running functional tests locally without using Docker)
Generally speaking, running through Docker, you always create the database, you always start up the application, you always run all the tests, not to mention the re-building of Docker images which takes ages... That's a lot of time just to run tests. You can develop functional tests much faster by hosting the application separately from running tests, and only running the single test you are writing. Here's how:
1. Set up Selenium environment with Chrome driver
- Download the latest Selenium Standalone Server (.jar) from http://www.seleniumhq.org/download/
- Download the latest ChromeDriver from https://sites.google.com/a/chromium.org/chromedriver/ (NOTE: Unpack the .zip)
- Start the selenium standalone server by entering
java -jar -Dwebdriver.chrome.driver=PATH_TO_CHROMEDRIVER PATH_TO_SELENIUM_STANDALONE_SERVERon your favourite command line tool. Example when files are located in the same folder and the Command Prompt points to it:
java -jar -Dwebdriver.chrome.driver=chromedriver.exe selenium-server-standalone-3.0.1.jar
NOTES: When you go to http://localhost:4444/ you should see text about Selenium. And more info about setting up the environment here: http://webdriver.io/guide/getstarted/install.html#Set-up-your-Selenium-environment
2. Host the UBORA web application
- Start the application through Visual Studio or PowerShell script and take note on what port it's hosted.
3. Specify port in WebDriverIO config
- Make sure the baseUrl in wdio.conf.js (which is located under Ubora/src/Ubora.Web.FunctionalTests) is set to "http://localhost:YOUR_PORT/". Example:
WARNING: Don't commit this! This would break the build in TeamCity.
**4. Run the tests **
- Open Git Bash window which points to ../Ubora.Web.FunctionalTests. If you have the extension, you can just navigate to the folder, right-click and select "Git Bash".
- Do "npm install" if you haven't done so before.
- To run all the tests:
./node_modules/.bin/wdio --port 4444
- To run a single test:
./node_modules/.bin/wdio --port 4444 --spec ./features/YOURSPECNAME.feature
NOTE: If you have problems, you might need to update Node. (Find out your version by entering
node -v.) Or you have wrong port specified under the wdio.conf.js --- the application has to be running and hosted on exactly that URL.
Nexus is not available on npm. Used nexus 4.1.6 in 3D file viewer from https://github.com/cnr-isti-vclab/nexus