Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Your Jenkins server should have be able to access the SVN server you just committed to - in case you didn't use the same computer. Navigate to the Jenkins server page in your browser.

...

Under "Build Triggers" select "Poll SCM" and in "Schedule" field use H/3 * * * * (every 3 minutes, let Jenkins choose the minute when it checks for SVN changes to avoid overcrowding in the future). This will make Jenkins check for SVN changes every minute (you You can increase that to decrease requests on the SVN server) and if . If changes are found Jenkins will trigger the build. If you want a check every minute use * * * * *.

...

Under "Build" click on "Add build step". Choose "Invoke Ant". Select the version you configured to auto-install at "Other things to configure" above. Click on "Advanced". In "Targets" type main_smart. In "Build file" type antRunner/jenkins_build.xml. In "Properties", expand the field (arrow down button) then type work.servoy.install.dir=[path_to_your_separate_Servoy_developer_installation] on one line and WORKSPACE=${WORKSPACE} on the second line. If you are on windows use '/' or '\\' instead of '\' in that path. For example "work.servoy.install.dir=f:/ServoyInstalls/Servoy_7.3".

...

After a build finishes you should have 4 files in your build/Status/Build Artifacts - one showing the test results and 3 Servoy log files showing what happened during export/import/test.

Step 4 -- Configure mobile client Jenkins job

...

Under "Build Triggers" select "Poll SCM" and in "Schedule" field use H/3 * * * * (every 3 minutes, let Jenkins choose the second minute when it checks for SVN changes to avoid overcrowding in the future). This will make Jenkins check for SVN changes every minute (you You can increase that to decrease requests on the SVN server) and if . If changes are found Jenkins will trigger the build. If you want a check every minute use * * * * *.

...

Under "Build" click on "Add build step". Choose "Invoke Ant". Select the version you configured to auto-install at "Other things to configure" above. Click on "Advanced". In "Targets" type main_mobile. In "Build file" type antRunner/jenkins_build.xml. In "Properties", expand the field (arrow down button) then type:

...

If you are on windows use '/' or '\\' instead of '\' in that path. For example:

Code Block
languagejava
work.servoy.install.dir=[path_to_your_separate_Servoy_developer_installation]f:/ServoyInstalls/Servoy_7.3
deploy.servoy.install.dir=[path_to_your_deployment_Servoy_developer_installation]
f:/ServoyInstalls/Servoy_7.3_deployment
webdriver.chrome.driver=[path_to_f:/Selenium/Drivers/Chrome/chromedriver.exe_that_was_downloaded_above]
selenium.server.jar=[path_to_downloaded_selenium_server_jar]
WORKSPACE=${WORKSPACE}

If you are on windows use '/' or '\\' instead of '\' in that path. For example:

Code Block
languagejava
work.servoy.install.dir=f:/ServoyInstalls/Servoy_7.3
deploy.servoy.install.dir=f:/ServoyInstalls/Servoy_7.3_deployment
webdriver.chrome.driver=f:/Selenium/Drivers/Chrome/chromedriver.exe
selenium.server.jar=f:/Selenium/selenium-server-standalone-2.33.0.jar

The deployment installation of Servoy can be the one that "Install/Start Servoy Server Importer" step will use.

Under "Post-build Actions":

...

f:/Selenium/selenium-server-standalone-2.33.0.jar

The deployment installation of Servoy can be the one that "Install/Start Servoy Server Importer" step will use.

Under "Post-build Actions":

  • add "Archive the artifacts" with this in "Files to archive": antRunner/jsunit_results/junit-noframes.html, antRunner/jsunit_results/smart_import_test_client_log.txt, antRunner/jsunit_results/workspace_exporter_app_server_log.txt, antRunner/jsunit_results/workspace_exporter_workspace_log.txt
  • add "Publish JUnit test result report" with "Test report XMLs" set to: antRunner/jsunit_results/junitTESTS-noframes.html, antRunner/jsunit_results/smart_import_test_client_log.txt, antRunner/jsunit_results/workspace_exporter_app_server_log.txt, antRunner/jsunit_results/workspace_exporter_workspace_log.txt
  • add "Publish JUnit test result report" with "Test report XMLs" set to: antRunner/jsunit_results/TESTS-TestSuites.xml
  • add "E-mail notification" and type your email address in "Recipients" field.

Click on "Save" and go back to Jenkins dashboard. The new job should automatically start in under 3 minute (or you can start it manually using the "play" icon next to it). It should export/run tests in chrome/export normal solution/copy it to deployment Servoy installation - with 2 test failures. To make the tests pass fix the regular expression as hinted by the comment in solution demo_ipAddressValidator, in the globals scope, and then commit the change to SVN.

If anything goes wrong you can click on your job's name then on the left side you see a list of builds. Click on the build that failed and you can see it's details (time/status/tests/console/...).

...

  • TestSuites.xml
  • add "E-mail notification" and type your email address in "Recipients" field.

Click on "Save" and go back to Jenkins dashboard. The new job should automatically start in under 3 minute (or you can start it manually using the "play" icon next to it). It should export/run tests in chrome/export normal solution/copy it to deployment Servoy installation - with 2 test failures. To make the tests pass fix the regular expression as hinted by the comment in solution demo_ipAddressValidator, in the globals scope, and then commit the change to SVN.

If anything goes wrong you can click on your job's name then on the left side you see a list of builds. Click on the build that failed and you can see it's details (time/status/tests/console/...).

After a build finishes you should have 4 files in your build/Status/Build Artifacts - one showing the test results and 3 Servoy log files showing what happened while exporting/testing.

Code Block
languagejava
work.servoy.install.dir=[path_to_your_separate_Servoy_developer_installation]
deploy.servoy.install.dir=[path_to_your_deployment_Servoy_developer_installation]
webdriver.chrome.driver=[path_to_chromedriver.exe_that_was_downloaded_above]
selenium.server.jar=[path_to_downloaded_selenium_server_jar]
WORKSPACE=${WORKSPACE}