├── specs └── example.spec ├── .templateignore ├── manifest.json ├── src └── test │ └── kotlin │ └── Sample.kt ├── metadata.json ├── .gitignore ├── README.md ├── .github ├── dependabot.yml └── workflows │ └── release.yml ├── env └── default │ ├── java.properties │ └── default.properties ├── pom.xml └── LICENSE /specs/example.spec: -------------------------------------------------------------------------------- 1 | # Test 2 | 3 | ## Print hello 4 | * Hello world -------------------------------------------------------------------------------- /.templateignore: -------------------------------------------------------------------------------- 1 | .git 2 | .github 3 | .templateignore 4 | README.md 5 | LICENSE -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "Language": "java", 3 | "Plugins": [ 4 | "html-report" 5 | ] 6 | } -------------------------------------------------------------------------------- /src/test/kotlin/Sample.kt: -------------------------------------------------------------------------------- 1 | import com.thoughtworks.gauge.Step 2 | 3 | class Sample { 4 | @Step("Hello world") 5 | fun sampleStep() { 6 | println("Hello world!") 7 | } 8 | } -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "java_maven", 3 | "description": "Gauge template for Kotlin plugin with Maven as Build tool", 4 | "version": "0.3.1", 5 | "postInstallCmd": "", 6 | "postInstallMsg": "Run specifications with \"mvn clean test\" in project root." 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gauge - metadata dir 2 | .gauge 3 | 4 | # Gauge - log files dir 5 | logs 6 | 7 | # Gauge - reports generated by reporting plugins 8 | reports 9 | 10 | # Gauge - java class output directory 11 | gauge_bin 12 | 13 | # Gauge - java class target dir 14 | target 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Template kotlin maven 2 | Kotlin template for [Gauge](https://gauge.org/) using maven as build tool 3 | 4 | ## How to use this template 5 | ```shell 6 | gauge template https://github.com/nilwurtz/gauge-kotlin-maven/releases/latest/download/kotlin_maven.zip 7 | gauge init 8 | ``` 9 | 10 | ## Run specs 11 | 12 | ```shell 13 | mvn clean test 14 | ``` 15 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "maven" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /env/default/java.properties: -------------------------------------------------------------------------------- 1 | 2 | # Specify an alternate Java home if you want to use a custom version 3 | gauge_java_home = 4 | 5 | # IntelliJ and Eclipse out directory will be usually autodetected 6 | # Use the below property if you need to override the build path 7 | gauge_custom_build_path = 8 | 9 | # specify the directory where additional libs are kept 10 | # you can specify multiple directory names separated with a comma (,) 11 | gauge_additional_libs = libs/* 12 | 13 | # JVM arguments passed to java while launching. Enter multiple values separated by comma (,) eg. Xmx1024m, Xms128m 14 | gauge_jvm_args = 15 | 16 | # specify the directory containing java files to be compiled 17 | # you can specify multiple directory names separated with a comma (,) 18 | gauge_custom_compile_dir = 19 | 20 | # specify the level at which the objects should be cleared 21 | # Possible values are suite, spec and scenario. Default value is scenario. 22 | gauge_clear_state_level = scenario 23 | -------------------------------------------------------------------------------- /env/default/default.properties: -------------------------------------------------------------------------------- 1 | # default.properties 2 | # properties set here will be available to the test execution as environment variables 3 | 4 | # sample_key = sample_value 5 | 6 | # The path to the gauge reports directory. Should be either relative to the project directory or an absolute path 7 | gauge_reports_dir = reports 8 | 9 | # Set as false if gauge reports should not be overwritten on each execution. A new time-stamped directory will be created on each execution. 10 | overwrite_reports = true 11 | 12 | # Set to false to disable screenshots on failure in reports. 13 | screenshot_on_failure = true 14 | 15 | # The path to the gauge logs directory. Should be either relative to the project directory or an absolute path 16 | logs_directory = logs 17 | 18 | # Set to true to use multithreading for parallel execution 19 | enable_multithreading = false 20 | 21 | # Possible values for this property are 'suite', 'spec' or 'scenario'. 22 | # 'scenario' clears the objects after the execution of each scenario, new objects are created for next execution. 23 | gauge_clear_state_level = scenario 24 | 25 | # The path the gauge specifications directory. Takes a comma separated list of specification files/directories. 26 | gauge_specs_dir = specs 27 | 28 | # The default delimiter used read csv files. 29 | csv_delimiter = , 30 | 31 | # Allows steps to be written in multiline 32 | allow_multiline_step = false -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | paths-ignore: 7 | - .github/** 8 | workflow_dispatch: 9 | inputs: 10 | release: 11 | description: 'True to release' 12 | required: true 13 | type: boolean 14 | 15 | jobs: 16 | check: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@v4 20 | 21 | - uses: actions/setup-java@v4 22 | with: 23 | distribution: 'adopt' 24 | java-version: '17' 25 | 26 | - uses: getgauge/setup-gauge@master 27 | 28 | - name: Run test 29 | run: mvn clean test 30 | 31 | release: 32 | runs-on: ubuntu-latest 33 | permissions: 34 | contents: write 35 | needs: check 36 | if: ${{ contains(github.event.head_commit.message, ':rocket:') || github.event.inputs.release == 'true' }} 37 | steps: 38 | - uses: actions/checkout@v4 39 | 40 | - name: package 41 | run: | 42 | ignored="! -path $(pwd) " 43 | for i in $(cat .templateignore); do 44 | ignored+="! -name $i " 45 | done 46 | files=$(find $(pwd) -maxdepth 1 $ignored) 47 | mkdir kotlin_maven 48 | cp -r $files ./kotlin_maven 49 | zip -r -X kotlin_maven.zip ./kotlin_maven; 50 | openssl sha256 kotlin_maven.zip | cut -d " " -f2 > kotlin_maven.zip.sha256 51 | 52 | - name: check deploy 53 | run: | 54 | wget -O current.sha256 https://github.com/nilwurtz/gauge-kotlin-maven/releases/latest/download/kotlin_maven.zip.sha256 55 | ! diff current.sha256 kotlin_maven.zip.sha256 56 | 57 | - name: version 58 | id: version 59 | run: | 60 | VERSION=$(jq -r ".version" metadata.json) 61 | echo "version=$VERSION" >> $GITHUB_OUTPUT 62 | 63 | - name: Create release 64 | id: create_release 65 | uses: softprops/action-gh-release@v2 66 | env: 67 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 68 | with: 69 | tag_name: v${{ steps.version.outputs.version }} 70 | name: Release v${{ steps.version.outputs.version }} 71 | files: | 72 | kotlin_maven.zip 73 | kotlin_maven.zip.sha256 74 | 75 | - name: bump up version 76 | run: | 77 | git clean -dfx 78 | version=$(jq -r ".version" metadata.json | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g') 79 | echo $(jq -r ".version = \"$version\"" metadata.json) | jq . > new_metadata.json 80 | cat new_metadata.json > metadata.json 81 | git config user.name "$(git --no-pager log --format=format:'%an' -n 1)" 82 | git config user.email "$(git --no-pager log --format=format:'%ae' -n 1)" 83 | git add metadata.json 84 | git commit -m ":up: Bumped version to $version" 85 | git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" main 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | gauge_kotlin_maven 7 | gauge_kotlin_maven 8 | 1.0-SNAPSHOT 9 | 10 | 11 | true 12 | 17 13 | 2.2.21 14 | ${java.version} 15 | 1.0.1 16 | 2.0.0 17 | UTF-8 18 | 19 | 20 | 21 | 22 | 23 | com.thoughtworks.gauge 24 | gauge-java 25 | ${gauge.java.version} 26 | test 27 | 28 | 29 | org.jetbrains.kotlin 30 | kotlin-stdlib 31 | ${kotlin.version} 32 | 33 | 34 | 35 | 36 | 37 | 38 | com.thoughtworks.gauge.maven 39 | gauge-maven-plugin 40 | ${gauge.maven.version} 41 | 42 | 43 | test 44 | 45 | specs 46 | 47 | 48 | validate 49 | execute 50 | 51 | 52 | 53 | 54 | 55 | org.jetbrains.kotlin 56 | kotlin-maven-plugin 57 | ${kotlin.version} 58 | 59 | 60 | -Xjsr305=strict 61 | 62 | ${kotlin.compiler.jvmTarget} 63 | 64 | 65 | 66 | compile 67 | compile 68 | 69 | compile 70 | 71 | 72 | 73 | test-compile 74 | test-compile 75 | 76 | test-compile 77 | 78 | 79 | 80 | src/test/kotlin 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | --------------------------------------------------------------------------------