buildscript { dependencies { classpath fileTree(dir: 'plugins', include: '*.jar', exclude: '*-sources.jar') } } repositories { jcenter() } dependencies { plugin 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0' } apply plugin: 'org.asciidoctor.gradle.asciidoctor' dependencies { compile project(":automation") compile project(":testing/proxy") compile project(":testing/servlet") compile fileTree(dir: 'vendor', include: '*.jar', exclude: '*-sources.jar') } dependencies { vendor 'com.esotericsoftware.yamlbeans:yamlbeans:1.09' vendor 'com.esotericsoftware.yamlbeans:yamlbeans:1.09:sources' vendor 'org.antlr:stringtemplate:4.0.2' vendor 'org.antlr:stringtemplate:4.0.2:sources' vendor 'org.testng:testng:6.9.9' vendor 'org.testng:testng:6.9.9:sources' vendor 'org.apache.httpcomponents:httpcore:4.4.4' vendor 'org.apache.httpcomponents:httpcore:4.4.4:sources' } configurations { vendor.exclude group: "org.apache.logging.log4j", module: "log4j-api" } task runAll(type: JavaExec, dependsOn: 'classes') { description = "Runs the testng-all.xml suite, which includes many of the other suites" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-d", "./build/test-output-all", "-configfailurepolicy", "continue", "./testng-all.xml"] dependsOn ':server:jar' } task runBasicMainlineTests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in dev mode against the mainline p4d" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-basic-mainline", "-configfailurepolicy", "continue", "./testng-basic-mainline.xml"] dependsOn ':server:jar' } task runBasic14_1Tests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in dev mode against the r14.1 server" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-basic-14.1", "-configfailurepolicy", "continue", "./testng-basic-14.1.xml"] dependsOn ':server:jar' } task runBasic14_2Tests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in dev mode against the r14.2 server" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-configfailurepolicy", "continue", "-d", "./build/test-output-basic-14.2", "./testng-basic-14.2.xml"] dependsOn ':server:jar' } task runBasic15_1Tests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in dev mode against the r15.1 server" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-basic-15.1", "-configfailurepolicy", "continue", "./testng-basic-15.1.xml"] dependsOn ':server:jar' } task runBasic15_2Tests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in dev mode against the r15.2 server" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-basic-15.2", "-configfailurepolicy", "continue", "./testng-basic-15.2.xml"] dependsOn ':server:jar' } task runBasic16_1Tests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in dev mode against the 16.1 server" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-basic-16.1", "-configfailurepolicy", "continue", "./testng-basic-16.1.xml"] dependsOn ':server:jar' } task runBasic16_1SslTests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in dev mode against the 16.1 SSL server" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-basic-16.1-ssl", "-configfailurepolicy", "continue", "./testng-basic-16.1-ssl.xml"] dependsOn ':server:jar' } task runCloudTests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in Cloud Setup with mock Raymond" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-cloud", "-configfailurepolicy", "continue", "./testng-cloud.xml"] dependsOn ':server:jar' } task runGitFusionTests(type: JavaExec, dependsOn: 'classes') { description = "Runs the test suite for the local HWS in Cloud Setup with mock Raymond" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-git-fusion", "-configfailurepolicy", "continue", "./testng-git-fusion.xml"] dependsOn ':server:jar' } ext { installSuiteName = "2016.1.0 Java SDK - ${System.getProperty('INSTALL_TYPE')} Install Setup " + "- 16.1 p4d - ${System.getProperty('os.name')} ${System.getProperty('DISTNAME')}" } task copyTestngInstall(type: Copy) { from "./testng-install.xml" into "$buildDir" expand(suiteName: installSuiteName) } task runInstallTests(type: JavaExec, dependsOn: ['classes', copyTestngInstall]) { description = "Runs the test suite for an installed HWS" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-install", "-configfailurepolicy", "continue", "$buildDir/testng-install.xml"] } task runRubyTests(type: JavaExec, dependsOn: ['classes', copyTestngInstall]) { description = "Runs the ruby 16.1 test suite" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-ruby", "-configfailurepolicy", "continue", "./testng-ruby-16.1.xml"] } task runPythonTests(type: JavaExec, dependsOn: ['classes', copyTestngInstall]) { description = "Runs the python 16.1 test suite" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-python", "-configfailurepolicy", "continue", "./testng-python-16.1.xml"] } task runDebTests(type: JavaExec, dependsOn: ['classes']) { description = "Runs the .deb deployment test suite" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-deployment-deb", "-configfailurepolicy", "continue", "./testng-deployment-deb.xml"] } task runRpmTests(type: JavaExec, dependsOn: ['classes']) { description = "Runs the .rpm deployment test suite" main = 'org.testng.TestNG' classpath = files("./src/test/resources", project.sourceSets.main.compileClasspath, project.sourceSets.test.compileClasspath, project.sourceSets.main.runtimeClasspath, project.sourceSets.test.runtimeClasspath) args = ["-parallel", "methods", "-threadcount", "1", "-d", "./build/test-output-deployment-rpm", "-configfailurepolicy", "continue", "./testng-deployment-rpm.xml"] } task asciidocReport(type: JavaExec) { description 'Create asciidoc report from test results' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.testing.reporting.AsciidocReportGenerator' args file("${buildDir}/test-output-all").canonicalPath, file("${buildDir}/asciidoc-report/report.asc").canonicalPath } asciidoctor { backends = ['html', 'docbook'] sourceDir = file("${buildDir}/asciidoc-report") sourceDocumentNames = fileTree("${buildDir}/asciidoc-report") { include 'report.asc' } } asciidoctor.dependsOn 'asciidocReport'
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#26 | 19803 | tjuricek |
Setting up the server to be deployable as a servlet, and adding custom "prefix" addition to all routes. It's not completely clear exactly when you'd want to do this, but, you could include the hws.jar in your app server and run this way. This adds a new "servlet example project" that we use to execute a basic test in the new suite. |
||
#25 | 19690 | drobins | Fix some checkstyle stuff, improve the use of constants and reduce the use of instanceof | ||
#24 | 19645 | tjuricek | Create test that uses reverse proxy to mount HWS under "/webservices", and then use the HWS java SDK to access it via that proxy. | ||
#23 | 19607 | tjuricek |
Add status check to log errors and flag ERROR if any p4ds are misconfigured. Run this check on startup. Note: I tried shutting down in the face of p4d configuration error - there be dragons down that route. It's very, very tricky to get the rules right for automation workflows, so I'm leaving that be at the moment and just making sure we have logging and a status reporting system. In theory, admins should be using some kind of monitor that says "uh oh error" and then they go check the logs and fix things. |
||
#22 | 19554 | swellard | Added a task to runPythonTests on their own | ||
#21 | 19546 | tjuricek | Revise the description on testing:runAll - this doesn't run everything, just what's defined in the testng-all.xml driver (so mostly everything) | ||
#20 | 19543 | tjuricek | Rename path to the AsciidocReportGenerator application | ||
#19 | 19383 | tjuricek | Fixes to the "unpack the prerelease archive file" along with preliminary work on the RPM upgrade test suite. | ||
#18 | 19380 | tjuricek |
Adjust post-install config to handle upgrades better, and a test for debian systems. - Our default config file has an invalid line to flag that the file has never been touched. It's removed on the first post-install config. - We guard against overwriting things the next times post-install config is run, like the keystore files. - There's a "media" setting in the install4j configuration to treat "never override" as config files, which avoid overwriting the config (finally found it), at least on debian. - Added a new test suite just to ensure the configuration file is not overwritten, only works for .debs at the moment |
||
#17 | 19362 | tjuricek |
Initial approach to running an upgrade, which basically gets past one stupid issue where the trust files already exist. This is likely not going to be how we exactly test. We'll probably want to run some before and after verifications, for example, to modify configuration and ensure it isn't touched during upgrades. But it's a starting point for further work. |
||
#16 | 19338 | tjuricek |
Create custom reporting mechanism to allow for clear "multiple suite" reports... with logging! This standardizes on log4j 2 as the backend (was just used on the server side). We have an "in memory appender" that we use to capture results during testing, which we associate with each method run. The whole system spits out yaml files for each suite run, which are then read in via a final task and a single html report is spit out with ... everything... in it. |
||
#15 | 19235 | tjuricek | The server spec crud test didn't run as super (hence a failure) and we needed to wait for buffered reading to finish before moving ahead with background processes. | ||
#14 | 19174 | tjuricek |
JaCoCo code coverage setup and test cleanup revisions. During test cleanup we remove the directory the code coverage data is written to, so we need refined control on where the output file goes (which is copied to a build directory, currently). |
||
#13 | 19065 | tjuricek |
Revised Javascript Client SDK documentation to meet the new API, with fixes. Added a couple of basic tests, and added archival of the different testng XML output. The main major fix is to handle array output better. |
||
#12 | 19038 | tjuricek |
Fixes to get windows going. The configuration directory was not correct in windows deployment. Also, have to capture exceptions in tests, otherwise TestNG will swallow the exception (yarg). |
||
#11 | 19016 | tjuricek |
Rename 'test-' jobs to 'verify-' to change CD behavior, and adjust TestNG to not skip tests if a configuration failure happens. The current CD system actually just treats configuration failures as "passes". The TestNG change will now execute dependent tests if a configuration failure happens... which should result in a test failure. The MCL script changes will now break all verification runs if any fail. |
||
#10 | 18905 | tjuricek |
Add Git Fusion environent configuration and testing, and altered the implementation to use the newly defined API. Note: only runs on linux. We use latest GF production for testing and GF packages are linux only. The "integration" is pretty "light" at this point. This does require the test machine to have our package repository setup. |
||
#9 | 18846 | tjuricek |
Added test setups for p4d versions going back to r14.1. There is now a big single testng test suite that runs through most of these variations. I've switched to using the p16.1 builds by default, which can easily be switched to the r16.1 builds. Mainline p4d builds are still in use, since they are informative. We may want to not use those on candidate line runs, however. |
||
#8 | 18630 | tjuricek |
Changing the p4d in use from 15.2 in ftp to mainline, and, adding alternative configurations to run r15.2 and r16.1 p4d locally. We'll run through these alternatives first. The distribution test runs will only run mainline builds (well, for the HWS mainline). I have *NO CLUE* how to make this smooth in the EC module configuration. So I'm going the route of syncing everything, because the platform variables set for my builds don't seem to match up with the p4d variables. |
||
#7 | 18293 | tjuricek | The install tests do not actually depend on the server jar existing, since, well, the install should have taken care of that. | ||
#6 | 18237 | tjuricek | Wire up more task dependencies for the install4j:media and test tasks. | ||
#5 | 18235 | tjuricek | Remove old omnibus packaging logic. | ||
#4 | 18234 | tjuricek |
Switched to gradle to drive the "hws.archive" build logic. While not absolutely critical, the main build system logic now runs on all OSes. The main trick is to understand that testing tasks can list a "finalizer" dependency to clean up even in the case of failure. The RVM logic will be "pushed out" into the build.conf. Given that we only need Ruby for mock_raymond (the Helix Cloud tests) this isn't that crazy. |
||
#3 | 18036 | tjuricek |
Add automated testing for the "binary" archive installation for Linux; revised CD process for new archives. The CD process will generate both binary archives and "raw" packages for the system now. (Note: only the binary archives for Linux are considered ready for automated testing at the moment.) |
||
#2 | 17144 | tjuricek |
Prepare build for java-land / Ignore trust settings for non-SSL connections. build.sh now depends upon java basically being correctly installed. (Java 8 JDK with JCE for p4 SSL connections.) |
||
#1 | 17140 | tjuricek |
Integrating porting work from development branch. This work is now ready for testing/CD integration. |