Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

Adding continuous integration with travis #332

Merged
merged 3 commits into from
Jun 14, 2016

Conversation

smarshy
Copy link
Contributor

@smarshy smarshy commented Jun 5, 2016

This PR sets up continuous integration with travis for systers vms repository. For convenience, a separate requirements.txt file has been updated with all the installations easier. The database credentials (vmsadmin and password ) have been removed to allow travis to login as default postgres user and carry out the tests. The travis file has also been configured to support GUI and headless browser testing.

After merging this PR, every commit/PR to the VMS repository will be checked to see if they break the tests (unit as well as functional). The requirements.txt file will also make vms setup more convenient.

The build is failing at this point. This failure is due to failing automated tests due to bugs (#327 and #325 ). Link to latest travis build - here

To verify that the cause of failure is only test failures, I tried commenting out these test cases and running the build again. It worked and the build passed. Link to passing travis build -here

Fixes #140

- psql -c "CREATE DATABASE vms;" -U postgres
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smarshy Why are we having a sleep here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tapasweni-pathak xfvb is imitating a display for automated tests. sleep is being used to just give it some time to start

@smarshy
Copy link
Contributor Author

smarshy commented Jun 6, 2016

@tapasweni-pathak I have updated this. Do you want me to comment out failing/error cases so that the build passes now and they can be added later?

@tapaswenipathak
Copy link
Contributor

@smarshy Yes. On top of them add a comment telling why they are commented.

@smarshy
Copy link
Contributor Author

smarshy commented Jun 7, 2016

@tapasweni-pathak When you ran the tests on local, did you get the same result : 8 failures, 1 error.
Because though my local shows that once I push it and run against travis, i get 8 failures, 3 errors.

@tapaswenipathak
Copy link
Contributor

@smarshy Yes, I got the same. 8 failures and 1 error, the same that you mentioned. I documented, them 7004567.

once I push it and run against travis, i get 8 failures, 3 errors.

Yes, I also checked the log. For some reason I missed pointing it out. test_details_tab and test_edit_profile are successfully passing in my local.

Can we add wait time before a test case?

Both test cases needs time. I am thinking may be that is the issue.

@smarshy
Copy link
Contributor Author

smarshy commented Jun 8, 2016

@tapasweni-pathak Yes, we can do that. In many places implicit wait has been used to allow the page to load before selenium webdriver throws an exception that it can't find the element. In future, that could be possibly a reason if some tests are failing just for travis. I will keep an eye out for that. Here though, I got the 'element not clickable' instead of 'element not found' error, so I have fixed that accordingly.

@tapaswenipathak
Copy link
Contributor

I am merging this, as soon as Travis gets enabled, automatically testing will be started.

Thanks for the work. :)

@tapaswenipathak tapaswenipathak merged commit 72dcee1 into anitab-org:develop Jun 14, 2016
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants