...
Info |
---|
Note: Jenkins access can be configured in other ways as well, if you don't have a google/other openID account or you just want to use something else (LDAP/custom users). |
...
Here are some settings you should/could tweak in Manage Jenkins > Configure System:
ant-contrib*.jar
is located in the unzipped contents - including file name....
...
In the SVN repository we will have Servoy solutions that need to be automatically tested using import-smart-client and a solution to be automatically tested in mobile-test-client. The ANT scripts used by Jenkins to automatically export and test Servoy solutions will be in a separate project 'antRunner' in the same SVN repository.
...
...
First we have to set-up sample SVN contents. This can be done on any computer with access to the SVN server, not necessarily on the same computer as Jenkins.
...
You can now have a look at the sample solutions and run tests on them from developer.
...
Install Subclipse plugin in Servoy Developer (Help > Install New Software) if you haven't already done so.
...
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.
...
...
Congratulations! Now you should have a working sample Mobile Client test job and a working sample Smart Client test job.
...
customize the job ant build's behavior by defining more properties in Build > Add build step > Invoke Ant > Advanced > Properties > expanded. Customizable properties are listed in the first section of 'antRunner/export_and_test.properties' and are explained in their comments preceding each one:
Code Block | ||
---|---|---|
| ||
# ------------------------------------------------------------------------------------------------ # Properties that you should set in Jenkins job configurations (ant advanced config; they will --- # be available to ant and also have precedence over what is defined in this file --- # ------------------------------------------------------------------------------------------------ # Servoy developer installation that will be used for exporting/testing (a separate install # is recommended for each Jenkins job in case multiple jobs are configured to run concurrently) work.servoy.install.dir = [your_jenkins_dedicated_servoy_installation_dir] work.servoy.install.url = http://localhost:8080 # Paths to other downloaded tools that we need webdriver.chrome.driver = [path_to_the_downloaded_selenium_chrome_driver_executable] selenium.server.jar = [path_to_downloaded_selenium_server_jar] # Solutions to be exported and then tested; # multiple solutions can be specified via a comma separated list of solution names smart_test_solutions = solution1,solution2 mobile_test_solutions = demo_ipAddressValidatorTester mobile_service_solutions = demo_ipAddressValidatorTester_service mobile_to_deploy = demo_ipAddressValidator mobile_to_deploy_services = demo_ipAddressValidator_service # If you are using a Servoy version >= 7.3 please uncomment or set the following (otherwise leave it # commented out; setting it to "false" or "nope" is not the same); the old way should work on 7.3 or # newer as well, but not the other way around; new way only only gets rid of some unneeded exporter # initialization time # work.servoy.install.7.3.or.higher = yep # 1 hour time-out; edit this as needed - depending on how long it usually takes for your solution tests to run (should probably be lower in most cases) test.timeout = 3600000 # Uncomment the following to send '-pl' argument to workspace solution exporters: alternate project locations; # solution and resources projects will be searched for in direct subfolders of the given 'WORKSPACE'. # Example: if the workspace needs to contain projects from different git repositories, those can be checked # out in '[WORKSPACE]/repo1', '[WORKSPACE]/repo2' and so on #alternate_project_locations.on=yep # Uncomment the following line/set this if you want passed exports generated by previous build # to be deleted at the beginning of each build cycle #always_clean_passed_exports = yep # For Sauce Labs test cloud (testing mobile clients); also uncomment relevant lines in # "run_mobile_client_tests_if_exported_ok" target of jenkins_build.xml; other changes might be needed as well, but this is the main idea #sauce.labs.user = [your Sauce Labs user here] #sauce.labs.token = [access token goes here] #sauce.labs.selenium.url = http://${sauce.labs.user}:${sauce.labs.token}@localhost:${SAUCE_ONDEMAND_PORT}/wd/hub # define a timeout for sauce labs to not require additional Selenium commands for a solution (set to 1.5 min; should be updated for how long your test can possibly take to run, but not much higher) #sauce.labs.selenium.idle-timeout = 90 # If you want your mobile solutions deployed to a Servoy server after testing is done, # uncomment / set values as in the following two lines and change the value of # servoy.deploy.install.dir to point to it; passed .war files will be copied to deploy.webapps.dir location. #deploy.servoy.install.dir = [your_mobile_war_deployment_servoy_installation] #deploy.webapps.dir = ${deploy.servoy.install.dir}/application_server/server/webapps # WORKSPACE property is normally already set by Jenkins in job build step # ANT_CONTRIB_JAR is normally already set if you followed all the steps in "Building a Software Factory" WIKI # page; it's set as a system property in global Jenkins configuration - environment variables #WORKSPACE = [if_not_set_by_Jenkins_you_can_configure_it_as_well] #ANT_CONTRIB_JAR = [if_not_set_in_Jenkins_config_as_environment_variable_you_can_configure_it_as_well] |
antRunner/export_and_test.xml
macrodefs 'export-solution' and 'export-mobile-solution'. You can see a list of available command line arguments in a console window by executing {servoyInstall}/developer/exporter/export.bat -help
and {servoyInstall}/developer/exporter/mobile_export.bat -help
;antRunner/export_and_test.xml
macrodefs 'run-smart-client-tests' and 'run-mobile-client-tests'. You can see a list of available arguments by commenting out the '<!--arg value="-help" /-->
' lines in these marcrodefs and creating/executing an ant task that calls them from the command line (or alternatively just comment out those lines in a Jenkins job and check the job build's console - after it is executed).