Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/check-jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ jobs:
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}



28 changes: 14 additions & 14 deletions .github/workflows/jreleaser-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ on:
jobs:
jreleaser:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for JReleaser

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
Expand All @@ -53,25 +53,25 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Install JReleaser CLI (manual setup)
run: |
# Try to install a working version manually
JRELEASER_VERSION="1.18.0"
mkdir -p ~/.jreleaser/bin

# Download the tar.gz version which usually contains all dependencies
curl -sL "https://github.com/jreleaser/jreleaser/releases/download/v${JRELEASER_VERSION}/jreleaser-tool-provider-${JRELEASER_VERSION}.jar" -o ~/.jreleaser/bin/jreleaser.jar

# Create a wrapper script
cat > ~/.jreleaser/bin/jreleaser << 'EOF'
#!/bin/bash
java -jar ~/.jreleaser/bin/jreleaser.jar "$@"
EOF
chmod +x ~/.jreleaser/bin/jreleaser

echo "$HOME/.jreleaser/bin" >> $GITHUB_PATH

- name: Print JReleaser version and check Java
run: |
echo "Java version:"
Expand Down Expand Up @@ -106,20 +106,20 @@ jobs:
exit 1
;;
esac

# Validate that version is not empty
if [ -z "$VERSION" ]; then
echo "❌ Error: Could not determine version!"
exit 1
fi

echo "PROJECT_VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "✅ Final version: $VERSION"

- name: Make publish script executable
run: chmod +x scripts/publish-maven-central.sh

- name: Run JReleaser
env:
DEPLOY: ${{ inputs.deploy_enabled }}
Expand All @@ -137,11 +137,11 @@ jobs:
echo "🔍 Checking JReleaser configuration for version $PROJECT_VERSION..."
fi
./scripts/publish-maven-central.sh

- name: Upload JReleaser logs
if: always()
uses: actions/upload-artifact@v4
with:
name: jreleaser-logs-${{ github.run_id }}
path: out/jreleaser/
retention-days: 5
retention-days: 5
7 changes: 3 additions & 4 deletions .github/workflows/local-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ jobs:
test-gradle:
name: gradle testing
runs-on: ubuntu-latest

steps:
- name: Checkout adapters-java
uses: actions/checkout@v4

- name: Setup java
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-package: jdk
java-version: ${{ env.JAVA_VERSION }}

- name: Run tests
run: |
./gradlew test

98 changes: 30 additions & 68 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
workflow_dispatch:
inputs:
run_tests:
description: 'Запустить тесты'
description: "Запустить тесты"
required: true
type: boolean
default: true
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- project_name: cucumber6-gradle-testng
configuration_id: CUCUMBER6_GRADLE_TESTNG_CONFIGURATION_ID
project_id: CUCUMBER6_GRADLE_TESTNG_PROJECT_ID

- project_name: cucumber5-gradle-junit4
configuration_id: CUCUMBER5_GRADLE_JUNIT4_CONFIGURATION_ID
project_id: CUCUMBER5_GRADLE_JUNIT4_PROJECT_ID
Expand All @@ -116,7 +116,7 @@ jobs:
- project_name: cucumber4-gradle-testng
configuration_id: CUCUMBER4_GRADLE_TESTNG_CONFIGURATION_ID
project_id: CUCUMBER4_GRADLE_TESTNG_PROJECT_ID

- project_name: selenide-gradle-junit5
configuration_id: SELENIDE_GRADLE_JUNIT5_CONFIGURATION_ID
project_id: SELENIDE_GRADLE_JUNIT5_PROJECT_ID
Expand Down Expand Up @@ -163,79 +163,41 @@ jobs:
./gradlew --no-daemon -DdisableSign=true publishToMavenLocal
dotnet build --configuration Debug --property WarningLevel=0 api-validator-dotnet
pip install testit-cli


- name: Create TestRun
run: |
testit testrun create --token ${{ env.TMS_PRIVATE_TOKEN }} --output ${{ env.TEMP_FILE }}
echo "TMS_TEST_RUN_ID=$(<${{ env.TEMP_FILE }})" >> $GITHUB_ENV
- name: Test
run: |
export SYNC_STORAGE_VERSION=$(grep -o 'SYNC_STORAGE_VERSION = "[^"]*"' testit-java-commons/src/main/java/ru/testit/syncstorage/SyncStorageRunner.java | cut -d'"' -f2)
# current location - /adapters-java/

cd java-examples/${{ matrix.project_name }}

mkdir -p .caches
wget -O .caches/syncstorage-linux-amd64 \
"https://github.com/testit-tms/sync-storage-public/releases/download/${SYNC_STORAGE_VERSION}/syncstorage-${SYNC_STORAGE_VERSION}-linux_amd64"
chmod +x .caches/syncstorage-linux-amd64
nohup .caches/syncstorage-linux-amd64 --testRunId ${{ env.TMS_TEST_RUN_ID }} --port 49152 \
--baseURL ${{ env.TMS_URL }} --privateToken ${{ env.TMS_PRIVATE_TOKEN }} > service.log 2>&1 &

sleep 1

curl -v http://127.0.0.1:49152/health || true

chmod +x ./gradlew
./gradlew test --no-daemon -DtmsUrl=${{ env.TMS_URL }} -DtmsPrivateToken=${{ env.TMS_PRIVATE_TOKEN }} -DtmsProjectId=${{ env.TMS_PROJECT_ID }} -DtmsConfigurationId=${{ env.TMS_CONFIGURATION_ID }} -DtmsAdapterMode=${{ env.TMS_ADAPTER_MODE }} -DtmsTestRunId=${{ env.TMS_TEST_RUN_ID }} -DtmsCertValidation=${{ env.TMS_CERT_VALIDATION }} || exit 0
./gradlew test --no-daemon -DtmsUrl=${{ env.TMS_URL }} -DtmsPrivateToken=${{ env.TMS_PRIVATE_TOKEN }} \
-DtmsProjectId=${{ env.TMS_PROJECT_ID }} -DtmsConfigurationId=${{ env.TMS_CONFIGURATION_ID }} \
-DtmsAdapterMode=${{ env.TMS_ADAPTER_MODE }} -DtmsTestRunId=${{ env.TMS_TEST_RUN_ID }} \
-DtmsCertValidation=${{ env.TMS_CERT_VALIDATION }} || true # ignore error code

sleep 1
cat service.log

curl -v http://127.0.0.1:49152/wait-completion?testRunId=${{ env.TMS_TEST_RUN_ID }} || true
# cat /home/runner/work/adapters-java/adapters-java/java-examples/gradle-junit5/build/.caches/shutdown.log
- name: Validate
run: |
dotnet test --configuration Debug --no-build --logger:"console;verbosity=detailed" api-validator-dotnet

# test-maven:
# needs: check-label
# if: ${{ needs.check-label.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' }}
# name: ${{ matrix.project_name }}
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# include:
# - project_name: maven-junit4
# configuration_id: MAVEN_JUNIT4_CONFIGURATION_ID
# project_id: MAVEN_JUNIT4_PROJECT_ID
# - project_name: maven-junit5
# configuration_id: MAVEN_JUNIT5_CONFIGURATION_ID
# project_id: MAVEN_JUNIT5_PROJECT_ID
# env:
# TMS_CONFIGURATION_ID: ${{ secrets[matrix.configuration_id] }}
# TMS_PROJECT_ID: ${{ secrets[matrix.project_id] }}
# TMS_TEST_RUN_NAME: ${{ matrix.project_name }} TestRun
# steps:
# - name: Checkout adapters-java
# uses: actions/checkout@v4
# - name: Checkout api-validator-dotnet
# uses: actions/checkout@v4
# with:
# repository: testit-tms/api-validator-dotnet
# token: ${{ env.GITHUB_PAT }}
# path: api-validator-dotnet
# - name: Checkout java-examples
# uses: actions/checkout@v4
# with:
# repository: testit-tms/java-examples
# path: java-examples
# - name: Setup dotnet
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: ${{ env.DOTNET_VERSION }}
# - name: Setup java
# uses: actions/setup-java@v4
# with:
# distribution: ${{ env.JAVA_DISTRIBUTION }}
# java-package: jdk
# java-version: ${{ env.JAVA_VERSION }}
# - name: Setup python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Setup environment
# run: |
# ./gradlew --no-daemon -DdisableSign=true publishToMavenLocal
# dotnet build --configuration Debug --property WarningLevel=0 api-validator-dotnet
# pip install testit-cli
# - name: Create TestRun
# run: |
# testit testrun create --token ${{ env.TMS_PRIVATE_TOKEN }} --output ${{ env.TEMP_FILE }}
# echo "TMS_TEST_RUN_ID=$(<${{ env.TEMP_FILE }})" >> $GITHUB_ENV
# - name: Test
# run: |
# cd java-examples/${{ matrix.project_name }}
# mvn test -DtmsUrl=${{ env.TMS_URL }} -DtmsPrivateToken=${{ env.TMS_PRIVATE_TOKEN }} -DtmsProjectId=${{ env.TMS_PROJECT_ID }} -DtmsConfigurationId=${{ env.TMS_CONFIGURATION_ID }} -DtmsAdapterMode=${{ env.TMS_ADAPTER_MODE }} -DtmsTestRunId=${{ env.TMS_TEST_RUN_ID }} -DtmsCertValidation=${{ env.TMS_CERT_VALIDATION }} || exit 0
# - name: Validate
# run: |
# dotnet test --configuration Debug --no-build --logger:"console;verbosity=detailed" api-validator-dotnet
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ configure(subprojects) {
options.encoding = "utf-8"
options.setIncremental(true)
options.isFork = true
//options.compilerArgs.add("-Xlint:-comment") // not supported in java 8
}

tasks.jar {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=2.10.2
version=3.0.0

org.gradle.daemon=true
org.gradle.parallel=true
Expand Down
2 changes: 1 addition & 1 deletion testit-adapter-cucumber4/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ test {
| It enables/disables TMS integration (**It's optional**). Default value - true | testIt | TMS_TEST_IT | tmsTestIt |
| Mode of automatic creation test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create a test case linked to the created autotest (not to the updated autotest)<br/>false - in this mode, the adapter will not create a test case | automaticCreationTestCases | TMS_AUTOMATIC_CREATION_TEST_CASES | tmsAutomaticCreationTestCases |
| Mode of automatic updation links to test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will update links to test cases<br/>false - in this mode, the adapter will not update link to test cases | automaticUpdationLinksToTestCases | TMS_AUTOMATIC_UPDATION_LINKS_TO_TEST_CASES | tmsAutomaticUpdationLinksToTestCases |
| Mode of import type selection when launching autotests (**It's optional**). Default value - true. The adapter supports following modes:<br/>true - in this mode, the adapter will create/update each autotest in real time<br/>false - in this mode, the adapter will create/update multiple autotests | importRealtime | TMS_IMPORT_REALTIME | tmsImportRealtime |
| Mode of import type selection when launching autotests (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create/update each autotest in real time<br/>false - in this mode, the adapter will create/update multiple autotests | importRealtime | TMS_IMPORT_REALTIME | tmsImportRealtime |
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tmsImportRealtime now false by default

| Name of the configuration file If it is not provided, it is used default file name (**It's optional**) | - | TMS_CONFIG_FILE | tmsConfigFile |

#### File
Expand Down
2 changes: 1 addition & 1 deletion testit-adapter-cucumber5/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ test {
| It enables/disables TMS integration (**It's optional**). Default value - true | testIt | TMS_TEST_IT | tmsTestIt |
| Mode of automatic creation test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create a test case linked to the created autotest (not to the updated autotest)<br/>false - in this mode, the adapter will not create a test case | automaticCreationTestCases | TMS_AUTOMATIC_CREATION_TEST_CASES | tmsAutomaticCreationTestCases |
| Mode of automatic updation links to test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will update links to test cases<br/>false - in this mode, the adapter will not update link to test cases | automaticUpdationLinksToTestCases | TMS_AUTOMATIC_UPDATION_LINKS_TO_TEST_CASES | tmsAutomaticUpdationLinksToTestCases |
| Mode of import type selection when launching autotests (**It's optional**). Default value - true. The adapter supports following modes:<br/>true - in this mode, the adapter will create/update each autotest in real time<br/>false - in this mode, the adapter will create/update multiple autotests | importRealtime | TMS_IMPORT_REALTIME | tmsImportRealtime |
| Mode of import type selection when launching autotests (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create/update each autotest in real time<br/>false - in this mode, the adapter will create/update multiple autotests | importRealtime | TMS_IMPORT_REALTIME | tmsImportRealtime |
| Name of the configuration file If it is not provided, it is used default file name (**It's optional**) | - | TMS_CONFIG_FILE | tmsConfigFile |

#### File
Expand Down
2 changes: 1 addition & 1 deletion testit-adapter-cucumber6/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ test {
| It enables/disables TMS integration (**It's optional**). Default value - true | testIt | TMS_TEST_IT | tmsTestIt |
| Mode of automatic creation test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create a test case linked to the created autotest (not to the updated autotest)<br/>false - in this mode, the adapter will not create a test case | automaticCreationTestCases | TMS_AUTOMATIC_CREATION_TEST_CASES | tmsAutomaticCreationTestCases |
| Mode of automatic updation links to test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will update links to test cases<br/>false - in this mode, the adapter will not update link to test cases | automaticUpdationLinksToTestCases | TMS_AUTOMATIC_UPDATION_LINKS_TO_TEST_CASES | tmsAutomaticUpdationLinksToTestCases |
| Mode of import type selection when launching autotests (**It's optional**). Default value - true. The adapter supports following modes:<br/>true - in this mode, the adapter will create/update each autotest in real time<br/>false - in this mode, the adapter will create/update multiple autotests | importRealtime | TMS_IMPORT_REALTIME | tmsImportRealtime |
| Mode of import type selection when launching autotests (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create/update each autotest in real time<br/>false - in this mode, the adapter will create/update multiple autotests | importRealtime | TMS_IMPORT_REALTIME | tmsImportRealtime |
| Name of the configuration file If it is not provided, it is used default file name (**It's optional**) | - | TMS_CONFIG_FILE | tmsConfigFile |

#### File
Expand Down
Loading
Loading