Skip to content

Commit

Permalink
- Require new SeleniumLibrary version that supports headlesschrome and
Browse files Browse the repository at this point in the history
  headlessfirefox
- Include headless chrome buildpack in app.json for builds
- Run robot library test suites in Heroku CI builds
  • Loading branch information
jlantz committed Mar 13, 2018
1 parent 4e69f8c commit 3361270
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app.json
Expand Up @@ -3,7 +3,9 @@
"test": {
"buildpacks": [
{"url": "heroku/python"},
{"url": "https://github.com/SalesforceFoundation/simple-salesforce-dx-buildpack.git"}
{"url": "https://github.com/SalesforceFoundation/simple-salesforce-dx-buildpack.git"},
{"url": "https://github.com/heroku/heroku-buildpack-google-chrome"},
{"url": "https://github.com/heroku/heroku-buildpack-chromedriver"}
],
"formation": {
"test": {
Expand Down
25 changes: 25 additions & 0 deletions heroku_ci.sh
Expand Up @@ -41,6 +41,31 @@ if [ "$HEROKU_TEST_RUN_BRANCH" != "master" ] &&\
fi
fi

# Run the robot tests for the CumulusCI and Salesforce library
echo "--------------------------------------------"
echo "Running CumulusCI and Salesforce robot tests
echo "--------------------------------------------"
# Start TAP output
echo "1...2"
coverage run --append --source=cumulusci `which cci` task run robot --org dev -o vars BROWSER:headlesschrome -o suites cumulusci/robotframework/tests/cumulusci | tee robot_cumulusci.log
exit_status=${PIPESTATUS[0]}
if [ "$exit_status" == "0" ]; then
echo "ok 1 - CumulusCI robot tests passed"
else
echo "not ok 1 - Failed CumulusCI robot tests: `cat robot_cumulusci.log`"
failed=1
fi
coverage run --append --source=cumulusci `which cci` task run robot --org dev -o vars BROWSER:headlesschrome -o suites cumulusci/robotframework/tests/salesforce | tee robot_salesforce.log
exit_status=${PIPESTATUS[0]}
if [ "$exit_status" == "0" ]; then
echo "ok 2 - Salesforce robot tests passed"
else
echo "not ok 2 - Failed Salesforce robot tests: `cat robot_salesforce.log`"
failed=1
fi
# Clone the CumulusCI-Test repo to run test builds against it with cci
echo "------------------------------------------"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -10,7 +10,7 @@ raven==6.1.0
requests[security]==2.9.1
responses==0.5.1
robotframework==3.0.2
robotframework-seleniumlibrary==3.0.1
robotframework-seleniumlibrary==3.1.1
rst2ansi==0.1.5
selenium
salesforce-bulk==2.0.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -30,7 +30,7 @@ def find_packages(path='.', prefix=""):
'requests[security]>=2.9.1',
'responses>=0.5.1',
'robotframework>=3.0.2',
'robotframework-seleniumlibrary>=3.0.1',
'robotframework-seleniumlibrary>=3.1.1',
'rst2ansi>=0.1.5',
'sarge>=0.1.4',
'selenium',
Expand Down

0 comments on commit 3361270

Please sign in to comment.