diff --git a/.github/workflows/kapua-ci.yaml b/.github/workflows/kapua-ci.yaml
index 71619d91923..31a636e97b1 100755
--- a/.github/workflows/kapua-ci.yaml
+++ b/.github/workflows/kapua-ci.yaml
@@ -160,9 +160,9 @@ jobs:
uses: actions/checkout@v4
- uses: ./.github/actions/runTestsTaggedAs
with:
- tag: '@jobs or @scheduler'
+ tag: '@job or @scheduler and not @it'
needs-docker-images: 'false'
- test-jobService:
+ Test - Job Service IT:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 45
@@ -173,7 +173,7 @@ jobs:
with:
tag: '@job and @it'
needs-docker-images: 'true'
- test-jobEngineOperations:
+ Test - Job Engine IT:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 45
@@ -206,83 +206,6 @@ jobs:
with:
tag: '@account or @translator'
needs-docker-images: 'false'
- test-jobEngineStepDefinitions:
- needs: build
- runs-on: ubuntu-latest
- timeout-minutes: 45
- steps:
- - name: Clones Kapua repo inside the runner
- uses: actions/checkout@v4
- - uses: ./.github/actions/runTestsTaggedAs
- with:
- tag: '@jobEngineStepDefinitions'
- needs-docker-images: 'true'
- test-jobEngineStartOfflineDevice:
- needs: build
- runs-on: ubuntu-latest
- timeout-minutes: 45
- steps:
- - name: Clones Kapua repo inside the runner
- uses: actions/checkout@v4
- - uses: ./.github/actions/runTestsTaggedAs
- with:
- tag: '@jobEngineStartOfflineDevice'
- needs-docker-images: 'true'
- test-jobEngineStartOnlineDevice:
- needs: build
- runs-on: ubuntu-latest
- timeout-minutes: 45
- steps:
- - name: Clones Kapua repo inside the runner
- uses: actions/checkout@v4
- - uses: ./.github/actions/runTestsTaggedAs
- with:
- tag: '@jobEngineStartOnlineDevice'
- needs-docker-images: 'true'
- test-jobEngineRestartOfflineDevice:
- needs: build
- runs-on: ubuntu-latest
- timeout-minutes: 45
- steps:
- - name: Clones Kapua repo inside the runner
- uses: actions/checkout@v4
- - uses: ./.github/actions/runTestsTaggedAs
- with:
- tag: '@jobEngineRestartOfflineDevice'
- needs-docker-images: 'true'
- test-jobEngineRestartOnlineDevice:
- needs: build
- runs-on: ubuntu-latest
- timeout-minutes: 45
- steps:
- - name: Clones Kapua repo inside the runner
- uses: actions/checkout@v4
- - uses: ./.github/actions/runTestsTaggedAs
- with:
- tag: '@jobEngineRestartOnlineDevice'
- needs-docker-images: 'true'
- test-jobEngineRestartOnlineDeviceSecondPart:
- needs: build
- runs-on: ubuntu-latest
- timeout-minutes: 45
- steps:
- - name: Clones Kapua repo inside the runner
- uses: actions/checkout@v4
- - uses: ./.github/actions/runTestsTaggedAs
- with:
- tag: '@jobEngineRestartOnlineDeviceSecondPart'
- needs-docker-images: 'true'
- test-jobEngineServiceStop:
- needs: build
- runs-on: ubuntu-latest
- timeout-minutes: 45
- steps:
- - name: Clones Kapua repo inside the runner
- uses: actions/checkout@v4
- - uses: ./.github/actions/runTestsTaggedAs
- with:
- tag: '@jobEngineServiceStop'
- needs-docker-images: 'true'
test-RoleAndGroup:
needs: build
runs-on: ubuntu-latest
diff --git a/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceOfflineDeviceI9nTest.java b/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceOfflineDeviceI9nTest.java
deleted file mode 100644
index ad9bb8a0f3f..00000000000
--- a/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceOfflineDeviceI9nTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2019, 2022 Eurotech and/or its affiliates and others
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Eurotech - initial API and implementation
- *******************************************************************************/
-package org.eclipse.kapua.integration.service.jobEngine;
-
-import io.cucumber.junit.Cucumber;
-import io.cucumber.junit.CucumberOptions;
-
-import org.junit.runner.RunWith;
-
-@RunWith(Cucumber.class)
-@CucumberOptions(
- features = {
- "classpath:features/jobEngine/JobEngineServiceStartOfflineDeviceI9n.feature",
- "classpath:features/jobEngine/JobEngineServiceRestartOfflineDeviceI9n.feature"
- },
- glue = { "org.eclipse.kapua.service.job.steps",
- "org.eclipse.kapua.service.user.steps",
- "org.eclipse.kapua.qa.common",
- "org.eclipse.kapua.qa.integration.steps",
- "org.eclipse.kapua.service.account.steps",
- "org.eclipse.kapua.service.device.registry.steps",
- },
- plugin = { "pretty",
- "html:target/cucumber/JobEngineServiceOfflineDeviceI9n",
- "json:target/JobEngineServiceOfflineDeviceI9n_cucumber.json" },
- monochrome = true)
-public class RunJobEngineServiceOfflineDeviceI9nTest {
-}
diff --git a/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceOnlineDeviceI9nTest.java b/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceOnlineDeviceI9nTest.java
deleted file mode 100644
index 8d38fd6441a..00000000000
--- a/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceOnlineDeviceI9nTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2019, 2022 Eurotech and/or its affiliates and others
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Eurotech - initial API and implementation
- *******************************************************************************/
-package org.eclipse.kapua.integration.service.jobEngine;
-
-import io.cucumber.junit.Cucumber;
-import io.cucumber.junit.CucumberOptions;
-import org.junit.runner.RunWith;
-
-@RunWith(Cucumber.class)
-@CucumberOptions(
- features = {
- "classpath:features/jobEngine/JobEngineServiceStartOnlineDeviceI9n.feature",
- "classpath:features/jobEngine/JobEngineServiceRestartOnlineDeviceI9n.feature",
- "classpath:features/jobEngine/JobEngineServiceRestartOnlineDeviceSecondPartI9n.feature",
- "classpath:features/jobEngine/JobEngineServiceStopOnlineDeviceI9n.feature",
- },
- glue = {"org.eclipse.kapua.service.job.steps",
- "org.eclipse.kapua.service.user.steps",
- "org.eclipse.kapua.qa.common",
- "org.eclipse.kapua.qa.integration.steps",
- "org.eclipse.kapua.service.account.steps",
- "org.eclipse.kapua.service.device.registry.steps"
- },
- plugin = {"pretty",
- "html:target/cucumber/JobEngineOnlineDeviceI9n",
- "json:target/JobEngineOnlineDeviceI9n_cucumber.json"},
- monochrome = true)
-public class RunJobEngineServiceOnlineDeviceI9nTest {
-}
diff --git a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOfflineDeviceI9n.feature b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOfflineDeviceI9n.feature
deleted file mode 100644
index 86abf46646d..00000000000
--- a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOfflineDeviceI9n.feature
+++ /dev/null
@@ -1,1024 +0,0 @@
-###############################################################################
-# Copyright (c) 2019, 2024 Eurotech and/or its affiliates and others
-#
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Eurotech - initial API and implementation
-###############################################################################
-@env_docker
-@it
-@jobEngineRestartOfflineDevice
-
-Feature: JobEngineService tests for restarting job with offline device
-
- @setup
- Scenario: Setup test resources
- Given Init Security Context
- And Start Docker environment with resources
- | db |
- | events-broker |
- | job-engine |
- | message-broker |
- | broker-auth-service |
- | consumer-lifecycle |
-
- # *************************************************
- # * Restarting a job with one Target and one Step *
- # *************************************************
-
- Scenario: Restarting job with Command Execution step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Asset Write step to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Asset Write step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Asset Write step to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Configuration Put step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Configuration Put step to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.demo.heater.Heater0.256022:00falseorg.eclipse.kura.demo.heater.Heaterorg.eclipse.kura.demo.heater.Heater06:00Programdata/21030.0213.030.0 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Bundle Start step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Bundle Start step to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Bundle Stop step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Bundle Stop step to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Package Install step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Package Install step to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.demo.heater_1.0.300.dpheater1.0.300true |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Package Uninstall step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Package Uninstall step to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.ble.tisensortag1.0.0true10000 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- # *******************************************************
- # * Restarting a job with one Target and multiple Steps *
- # *******************************************************
-
- Scenario: Restarting job with two Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a two new Bundle Start steps to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Bundle Stop and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Bundle Stop and Bundle Start steps to the created job. Restart the job before starting.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Package Download/Install and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Install and Bundle Start steps to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.demo.heater_1.0.300.dpheater1.0.300true |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting a job with Package Uninstall and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Package Uninstall and Bundle Start steps to the created job. Restart the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.ble.tisensortag1.0.0true10000 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- When I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- Then I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting a job with Command Execution and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Command Execution and Bundle Stop steps to the created job. Restart the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting a job with Asset Write and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Asset Write and Bundle Start steps to the created job. Restart the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting a job with Configuration Put and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Configuration Put and Bundle Start steps to the created job. Restart the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.demo.heater.Heater0.256022:00falseorg.eclipse.kura.demo.heater.Heaterorg.eclipse.kura.demo.heater.Heater06:00Programdata/21030.0213.030.0 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- # *******************************************************
- # * Restarting a job with multiple Targets and one Step *
- # *******************************************************
-
- Scenario: Restarting job with Bundle Start step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Bundle Start step to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Bundle Stop step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Bundle Stop step to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Package Download/Install step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Install step to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.demo.heater_1.0.300.dpheater1.0.300true |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Package Uninstall step and multiple device
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Uninstall step to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | heater1.0.300true30000 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Asset Write step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Asset Write step to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Configuration Put step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Configuration Put step to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.demo.heater.Heater0.256022:00falseorg.eclipse.kura.demo.heater.Heaterorg.eclipse.kura.demo.heater.Heater06:00Programdata/21030.0213.030.0 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Command Execution step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Command Execution step to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- # *************************************************************
- # * Restarting a job with multiple Targets and multiple Steps *
- # *************************************************************
-
- Scenario: Restarting job with two Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a two Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I restart a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Bundle Stop and Bundle Start step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Bundle Stop and Bundle Start step to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I restart a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Package Download/Install and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Install and Bundle Start steps to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.demo.heater_1.0.300.dpheater1.0.300true |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I restart a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Package Uninstall and Bundle start steps and multiple device
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Uninstall and Bundle Start steps to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | heater1.0.300true30000 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I restart a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Asset Write and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Asset Write and Bundle Start steps to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I restart a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Configuration Put and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Configuration Put and BundleStart steps to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.demo.heater.Heater0.256022:00falseorg.eclipse.kura.demo.heater.Heaterorg.eclipse.kura.demo.heater.Heater06:00Programdata/21030.0213.030.0 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I restart a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Restarting job with Command Execution and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Command Execution and Bundle Start steps to the created job. Restart the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I restart a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- @teardown
- Scenario: Tear down test resources
- Given Stop Docker environment
- And Clean Locator Instance
diff --git a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOnlineDeviceI9n.feature b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOnlineDeviceI9n.feature
deleted file mode 100644
index b7143da3e38..00000000000
--- a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOnlineDeviceI9n.feature
+++ /dev/null
@@ -1,507 +0,0 @@
-###############################################################################
-# Copyright (c) 2019, 2024 Eurotech and/or its affiliates and others
-#
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Eurotech - initial API and implementation
-###############################################################################
-@env_docker
-@it
-@jobEngineRestartOnlineDevice
-
-Feature: JobEngineService restart job tests with online device
-
- @setup
- Scenario: Setup test resources
- Given Init Security Context
- And Start Docker environment with resources
- | db |
- | events-broker |
- | job-engine |
- | message-broker |
- | broker-auth-service |
- | consumer-lifecycle |
-
- # *************************************************
- # * Restarting a job with one Target and one Step *
- # *************************************************
-
- Scenario: Restarting job with valid Command Execution step two times
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Command Execution step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 1 event within 30 seconds
- And The type of the last event is "BIRTH"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 or more events within 30 seconds
- Then KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Bundle Start step two times
- Create a new job and set a connected KuraMock device as the job target.
- Add a new Bundle Start step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "BUNDLE"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Bundle Stop step two times
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Bundle Stop step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "BUNDLE"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- Then Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Restarting a job with valid Package Uninstall step two times
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Package Uninstall step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Then Packages are requested and 1 package is received
- And I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "DEPLOY"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items or more and I confirm the executed jobs are finished within 45 seconds
- And I search for events from device "rpione3" in account "kapua-sys" I find 2 or more events within 30 seconds
- Then Packages are requested and 0 packages are received
- And KuraMock is disconnected
- And I logout
-
- #*******************************************************
- #* Restarting a job with one Target and multiple Steps *
- #*******************************************************
-
- Scenario: Restarting job with valid Command Execution and Package Install steps two times
- Create a new job and set a connected KuraMock device as the job target.
- Add new valid Command Execution and valid Package Install steps to the created job.
- Restart the job two times. After the executed job is finished, the executed target's
- step index should be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Command "pwd" is executed
- And Packages are requested and 1 package is received
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- And The type of the last event is "DEPLOY"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And I search for step definition with the name
- | Command Execution |
- | Package Download / Install |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
- | timeout | java.lang.Long | 10000 |
- And I create multiple new JobSteps from the existing creators
- Then No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- Then KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Bundle Start And Bundle Stop steps two times
- Create a new job and set a connected KuraMock device as the job target.
- Add new Bundle Start and Bundle Stop steps to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- And Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "BUNDLE"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 4 or more events within 30 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
- And KuraMock is disconnected
- And I logout
-
- #*******************************************************
- #* Restarting a job with multiple Targets and one Step *
- #*******************************************************
-
- Scenario: Restarting job with valid Command Execution step and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Command Execution step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Devices status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Command "pwd" is executed
- When I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "COMMAND"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events are found
- Then KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Bundle Start step and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new Bundle Start step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "BUNDLE"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events are found
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Bundle Stop step and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Bundle Stop step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- When I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "BUNDLE"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events are found
- Then Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Restarting a job with valid Package Uninstall step and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Package Uninstall step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Devices status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Then Packages are requested and 1 package is received
- And I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "DEPLOY"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items or more and I confirm the executed jobs are finished within 45 seconds
- And I search events from devices in account "kapua-sys" and 2 or more events are found
- And Packages are requested and 0 packages are received
- And KuraMock is disconnected
- And I logout
-
- # *************************************************************
- # * Restarting a job with multiple Targets and multiple Steps *
- # *************************************************************
-
- Scenario: Restarting job with valid Command Execution and Package Install steps and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Command Execution and valid Package Install steps to the created job.
- Restart the job two times. After the executed job is finished, the executed target's
- step index should be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Devices status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Command "pwd" is executed
- And Packages are requested and 1 package is received
- When I search events from devices in account "kapua-sys" and 3 events are found
- And The type of the last event is "DEPLOY"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And I search for step definition with the name
- | Command Execution |
- | Package Download / Install |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
- | timeout | java.lang.Long | 10000 |
- And I create multiple new JobSteps from the existing creators
- Then No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events are found
- And Packages are requested and 2 packages are received
- Then KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Bundle Start and Bundle Stop steps and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Bundle Start and Bundle Stop steps to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Devices status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- When I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "BUNDLE"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 4 or more events are found
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
- And KuraMock is disconnected
- And I logout
-
- @teardown
- Scenario: Tear down test resources
- Given Stop Docker environment
- And Clean Locator Instance
diff --git a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOnlineDeviceSecondPartI9n.feature b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOnlineDeviceSecondPartI9n.feature
deleted file mode 100644
index 091abf4b764..00000000000
--- a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceRestartOnlineDeviceSecondPartI9n.feature
+++ /dev/null
@@ -1,434 +0,0 @@
-###############################################################################
-# Copyright (c) 2019, 2024 Eurotech and/or its affiliates and others
-#
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Eurotech - initial API and implementation
-###############################################################################
-@env_docker
-@it
-@jobEngineRestartOnlineDeviceSecondPart
-
-Feature: JobEngineService restart job tests with online device - second part
-
- @setup
- Scenario: Setup test resources
- Given Init Security Context
- And Start Docker environment with resources
- | db |
- | events-broker |
- | job-engine |
- | message-broker |
- | broker-auth-service |
- | consumer-lifecycle |
-
- # *************************************************
- # * Restarting a job with one Target and one Step *
- # *************************************************
-
- Scenario: Restarting a job with valid Configuration Put step two times
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Configuration Put step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "CONFIGURATION"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
- | timeout | java.lang.Long | 10000 |
- Then I create a new JobStep from the existing creator
- And I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- When I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- When I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Restarting a job with valid Package Install step two times
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Package Install step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "DEPLOY"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
- | timeout | java.lang.Long | 30000 |
- When I create a new JobStep from the existing creator
- And I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Then I query for the job with the name "TestJob" and I count 1 execution item or more and I confirm the executed job is finished within 20 seconds
- When I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Then I query for the job with the name "TestJob" and I count 2 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- When Packages are requested and 2 packages are received
- And KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job With valid Asset Write step two times
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Asset Write step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 123 are received
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "ASSET"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 1233 are received
- Then KuraMock is disconnected
- And I logout
-
- # *******************************************************
- # * Restarting a job with one Target and multiple Steps *
- # *******************************************************
-
- Scenario: Restarting job with valid Configuration Put and Command Execution steps two times
- Create a new job. Set a connected Kura Mock device as a job target.
- Add a new valid Configuration Put and Command Execution steps to the created job. Restart the job two times.
- After the executed job is finished, the step index of executed targets should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
- And Command "pwd" is executed
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- And The type of the last event is "COMMAND"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And I search for step definitions with the name
- | Configuration Put |
- | Command Execution |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create multiple new JobSteps from the existing creators
- And No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item or more and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
- When KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Package Uninstall and Asset Write steps two times
- Create a new job and set a connected KuraMock device as the job target.
- Add new valid Package Uninstall and valid Asset Write steps to the created job.
- Restart the job two times. After the executed job is finished, the executed target's
- step index should be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 123 are received
- And Packages are requested and 1 package is received
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- And The type of the last event is "DEPLOY"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And I search for step definitions with the name
- | Package Uninstall |
- | Asset Write |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
- | timeout | java.lang.Long | 10000 |
- When I create multiple new JobSteps from the existing creators
- And No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 1233 are received
- And Packages are requested and 0 packages are received
- Then KuraMock is disconnected
- And I logout
-
- # *******************************************************
- # * Restarting a job with multiple Targets and one Step *
- # *******************************************************
-
- Scenario: Restarting a job with valid Configuration Put step and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job target.
- Add a new valid Configuration Put step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
- And I search events from devices in account "kapua-sys" and 2 events is found
- Given I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- And I search events from devices in account "kapua-sys" and 3 or more events are found
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Restarting a job with valid Package Install step and multiple devices two times
- Create a new job and set a connected KuraMock device as the job target. Add a new valid Package Install
- step to the created job. Restart the job two times. After the executed job is finished, the executed
- target's step index should be 0 and the status PROCESS_OK.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Packages are requested and 1 package is received
- And I search events from devices in account "kapua-sys" and 2 events is found
- Given I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
- | timeout | java.lang.Long | 30000 |
- When I create a new JobStep from the existing creator
- And I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Then I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Then I query for the job with the name "TestJob" and I count 2 execution items or more and I confirm the executed jobs are finished within 45 seconds
- And I search events from devices in account "kapua-sys" and 3 or more events is found
- When Packages are requested and 2 packages are received
- And KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Asset Write step and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Asset Write step to the created job. Restart the job two times.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Devices status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 123 are received
- And I search events from devices in account "kapua-sys" and 2 events is found
- And The type of the last event is "ASSET"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- And I search events from devices in account "kapua-sys" and 3 or more events is found
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 1233 are received
- Then KuraMock is disconnected
- And I logout
-
- # *************************************************************
- # * Restarting a job with multiple Targets and multiple Steps *
- # *************************************************************
-
- Scenario: Restarting job with valid Configuration Put and Command Execution steps and multiple devices two times
- Create a new job. Set a connected Kura Mock devices as a job target.
- Add a new valid Configuration Put and Command Execution steps to the created job. Restart the job two times.
- After the executed job is finished, the step index of executed targets should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- Then I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
- And Command "pwd" is executed
- When I search events from devices in account "kapua-sys" and 3 events is found
- And The type of the last event is "COMMAND"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And I search for step definitions with the name
- | Configuration Put |
- | Command Execution |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create multiple new JobSteps from the existing creators
- And No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events is found
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
- When KuraMock is disconnected
- And I logout
-
- Scenario: Restarting job with valid Package Uninstall and Asset Write steps and multiple devices two times
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Package Uninstall and valid Asset Write steps to the created job.
- Restart the job two times. After the executed job is finished, the executed target's
- step index should be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Devices status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Packages are requested and 1 package is received
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 123 are received
- When I search events from devices in account "kapua-sys" and 3 events is found
- And The type of the last event is "ASSET"
- Given I create a job with the name "TestJob"
- And I add targets to job
- And I search for step definitions with the name
- | Package Uninstall |
- | Asset Write |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
- | timeout | java.lang.Long | 10000 |
- When I create multiple new JobSteps from the existing creators
- And No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- Then I restart a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 2 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events is found
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 1233 are received
- And Packages are requested and 0 packages are received
- Then KuraMock is disconnected
- And I logout
-
- @teardown
- Scenario: Tear down test resources
- Given Stop Docker environment
- And Clean Locator Instance
diff --git a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStartOfflineDeviceI9n.feature b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStartOfflineDeviceI9n.feature
deleted file mode 100644
index f034ae8f659..00000000000
--- a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStartOfflineDeviceI9n.feature
+++ /dev/null
@@ -1,1138 +0,0 @@
-###############################################################################
-# Copyright (c) 2019, 2024 Eurotech and/or its affiliates and others
-#
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Eurotech - initial API and implementation
-###############################################################################
-@env_docker
-@it
-@jobEngineStartOfflineDevice
-
-Feature: JobEngineService tests for starting job with offline device
-
- @setup
- Scenario: Setup test resources
- Given Init Security Context
- And Start Docker environment with resources
- | db |
- | events-broker |
- | job-engine |
- | message-broker |
- | broker-auth-service |
- | consumer-lifecycle |
-
- # ***********************************************
- # * Starting a job with one Target and one Step *
- # ***********************************************
-
- Scenario: Starting a job with Command Execution step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Command Execution step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting a job with Asset Write step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Asset Write step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting a job with Bundle Start step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Bundle Start step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with Bundle Stop step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Bundle Stop step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with Configuration Put step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Configuration Put step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.demo.heater.Heater0.256022:00falseorg.eclipse.kura.demo.heater.Heaterorg.eclipse.kura.demo.heater.Heater06:00Programdata/21030.0213.030.0 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting a job with Package Install step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Package Install step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.demo.heater_1.0.300.dpheater1.0.300true |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Packages are requested and 1 package is received
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with Package Uninstall step
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Package Uninstall step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- And Package named "org.eclipse.kura.example.beacon" with version "1.0.300" is received
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Packages are requested and 1 package is received
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- # *****************************************************
- # * Starting a job with one Target and multiple Steps *
- # *****************************************************
-
- Scenario: Starting a job with Command Execution and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Command Execution and Bundle Stop steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with Asset Write and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Asset Write and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with two Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add two new Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And A bundle named "com.google.guava" with id 95 and version "19.0.0" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 95 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- And I wait 10 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And A bundle named "com.google.guava" with id 95 and version "19.0.0" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with Bundle Stop and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Bundle Stop and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with Configuration Put and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Configuration Put and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.demo.heater.Heater0.256022:00falseorg.eclipse.kura.demo.heater.Heaterorg.eclipse.kura.demo.heater.Heater06:00Programdata/21030.0213.030.0 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Bundles are requested
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with Package Install and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Package Install and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- And Bundles are requested
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.demo.heater_1.0.300.dpheater1.0.300true |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Packages are requested and 1 package is received
- And Bundles are requested
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- And Device status is "DISCONNECTED" within 10 seconds
- And I logout
-
- Scenario: Starting a job with Package Uninstall and Bundle Start steps
- Create a new job and set a disconnected KuraMock device as the job target.
- Add a new Package Uninstall and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_FAILED.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- And Package named "org.eclipse.kura.example.beacon" with version "1.0.300" is received
- And Bundles are requested
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And A new job target item
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- When I start the Kura Mock
- And Device is connected within 10 seconds
- And Packages are requested and 1 package is received
- And KuraMock is disconnected
- And I logout
-
- # *****************************************************
- # * Starting a job with multiple Targets and one Step *
- # *****************************************************
-
- Scenario: Starting job with Bundle Start step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Bundle Start step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 136 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Bundle Stop step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Bundle Stop step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 136 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Package Download/Install step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Install step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.demo.heater_1.0.300.dpheater1.0.300true |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And Packages are requested
- Then Number of received packages is 1
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting job with Package Uninstall step and multiple device
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Uninstall step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | timeout | java.lang.Long | 30000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Asset Write step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Asset Write step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Configuration Put step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Configuration Put step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.demo.heater.Heater0.256022:00falseorg.eclipse.kura.demo.heater.Heaterorg.eclipse.kura.demo.heater.Heater06:00Programdata/21030.0213.030.0 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Command Execution step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Command Execution step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- # ***********************************************************
- # * Starting a job with multiple Targets and multiple Steps *
- # ***********************************************************
-
- Scenario: Starting job with two Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a two Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 136 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 36 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Bundle Stop and Bundle Start step and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Bundle Stop and Bundle Start step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I wait 1 second
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 136 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 36 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Package Download/Install and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Install and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.demo.heater_1.0.300.dpheater1.0.300true |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 36 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And Packages are requested
- Then Number of received packages is 1
- And Bundles are requested
- And I logout
-
- Scenario: Starting job with Package Uninstall and Bundle start steps and multiple device
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Package Uninstall and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | timeout | java.lang.Long | 30000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 36 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Asset Write and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Asset Write and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 36 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Configuration Put and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Configuration Put and BundleStart steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.demo.heater.Heater0.256022:00falseorg.eclipse.kura.demo.heater.Heaterorg.eclipse.kura.demo.heater.Heater06:00Programdata/21030.0213.030.0 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 36 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- Scenario: Starting job with Command Execution and Bundle Start steps and multiple devices
- Create a new job. Set a disconnected Kura Mock devices as a job targets.
- Add a new Command Execution and Bundle Start steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- When KuraMock is disconnected
- And I wait 1 second
- Then Device status is "DISCONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- Given I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope
- Then I count 2
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 36 |
- | timeout | java.lang.Long | 50000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then No exception was thrown
- And I start a job
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for the last job target in the database
- And I confirm the step index is 0 and status is "PROCESS_FAILED"
- And I logout
-
- @teardown
- Scenario: Tear down test resources
- Given Stop Docker environment
- And Clean Locator Instance
diff --git a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStartOnlineDeviceI9n.feature b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStartOnlineDeviceI9n.feature
deleted file mode 100644
index 6dec95a2886..00000000000
--- a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStartOnlineDeviceI9n.feature
+++ /dev/null
@@ -1,867 +0,0 @@
-###############################################################################
-# Copyright (c) 2019, 2024 Eurotech and/or its affiliates and others
-#
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Eurotech - initial API and implementation
-###############################################################################
-@env_docker
-@it
-@jobEngineStartOnlineDevice
-
-Feature: JobEngineService start job tests with online device
-
- @setup
- Scenario: Setup test resources
- Given Init Security Context
- And Start Docker environment with resources
- | db |
- | events-broker |
- | job-engine |
- | message-broker |
- | broker-auth-service |
- | consumer-lifecycle |
-
- # ***********************************************
- # * Starting a job with one Target and one Step *
- # ***********************************************
-
- Scenario: Starting a job with valid Command Execution step
- Create a new job and set a connected KuraMock device as the job target.
- Add a new Command Execution step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 1 event within 30 seconds
- And The type of the last event is "BIRTH"
- Given I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Bundle Start step
- Create a new job and set a connected KuraMock device as the job target.
- Add a new Bundle Start step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "BUNDLE"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- And Bundles are requested
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
- When KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Bundle Stop step
- Create a new job and set a connected KuraMock device as the job target.
- Add a new Bundle Stop step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- And Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "BUNDLE"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Configuration Put step
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Configuration Put step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- When Configuration is requested
- Then A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "CONFIGURATION"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
- | timeout | java.lang.Long | 10000 |
- Then I create a new JobStep from the existing creator
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- When I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- And The type of the last event is "CONFIGURATION"
- And Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Package Install step
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Package Install step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "DEPLOY"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
- | timeout | java.lang.Long | 30000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- And Packages are requested and 2 packages are received
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Asset Write step
- Create a new job and set a connected KuraMock device as the job target.
- Add a new valid Asset Write step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- When Device assets are requested
- Then Asset with name "asset1" and channel with name "channel1" and value 123 are received
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "ASSET"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- When Device assets are requested
- Then Asset with name "asset1" and channel with name "channel1" and value 1233 are received
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Package Uninstall step
- Create a new job. Set a connected Kura Mock device as a job target.
- Add a new valid Package Uninstall step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Packages are requested and 1 package is received
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "DEPLOY"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- And Packages are requested and 0 packages are received
- And KuraMock is disconnected
- And I logout
-
- #*****************************************************
- #* Starting a job with one Target and multiple Steps *
- #*****************************************************
-
- Scenario: Starting job with valid Command Execution and Package Install steps
- Create a new job. Set a connected Kura Mock device as a job target.
- Add a new valid Command Execution and Package Install steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- When Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Command "pwd" is executed
- And Packages are requested and 1 package is received
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- Then The type of the last event is "DEPLOY"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And I search for step definition with the name
- | Command Execution |
- | Package Download / Install |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
- | timeout | java.lang.Long | 10000 |
- And I create multiple new JobSteps from the existing creators
- Then No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- When I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- And Packages are requested and 2 packages are received
- When KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Bundle Start and Bundle Stop steps
- Create a new job and set a connected KuraMock device as the job target.
- Add two new Bundle Start and Bundle Stop steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds
- And The type of the last event is "BUNDLE"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 4 events within 30 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting job with valid Configuration Put and Command Execution steps
- Create a new job. Set a connected Kura Mock device as a job target.
- Add a new valid Configuration Put and Command Execution steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- And Configuration is requested
- Then A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
- And Command "pwd" is executed
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- And The type of the last event is "COMMAND"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And I search for step definitions with the name
- | Configuration Put |
- | Command Execution |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create multiple new JobSteps from the existing creators
- And No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then I start a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 5 events within 30 seconds
- And Configuration is requested
- Then A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
- When KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Package Uninstall and Asset Write steps
- Create a new job and set a connected KuraMock device as the job target.
- Add new valid Package Uninstall and Asset Write steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I start the Kura Mock
- And Device is connected within 10 seconds
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock device after 5 seconds
- When Device assets are requested
- Then Asset with name "asset1" and channel with name "channel1" and value 123 are received
- And Packages are requested and 1 package is received
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
- And The type of the last event is "DEPLOY"
- And I create a job with the name "TestJob"
- And I create a new job target item
- And I search for step definitions with the name
- | Package Uninstall |
- | Asset Write |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
- | timeout | java.lang.Long | 10000 |
- When I create multiple new JobSteps from the existing creators
- And No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search for events from device "rpione3" in account "kapua-sys" I find 3 or more events within 30 seconds
- When Device assets are requested
- Then Asset with name "asset1" and channel with name "channel1" and value 1233 are received
- And Packages are requested and 0 packages are received
- And KuraMock is disconnected
- And I logout
-
- #*****************************************************
- #* Starting a job with multiple Targets and one Step *
- #*****************************************************
-
- Scenario: Starting job with valid Command Execution step and multiple devices
- Create a new job. Set connected Kura Mock devices as a job targets.
- Add a new valid Command Execution step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Command "pwd" is executed
- And I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "COMMAND"
- And I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Command Execution"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search events from devices in account "kapua-sys" and 3 events are found
- When KuraMock is disconnected
- And I logout
-
- Scenario: Starting job with valid Bundle Start step and multiple devices
- Create a new job. Set connected Kura Mock devices as a job targets.
- Add a new Bundle Start step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Device are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Bundles are requested
- And A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "BUNDLE"
- And I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search events from devices in account "kapua-sys" and 3 events are found
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting job with invalid Bundle Start step and multiple devices
- Create a new job. Set connected Kura Mock devices as a job targets.
- Add a new Bundle Start step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_FAILED
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Device are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "BUNDLE"
- And I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | #34 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_FAILED" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search events from devices in account "kapua-sys" and 2 events are found
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Bundle Stop step and multiple devices
- Create a new job and set connected KuraMock devices as the job targets.
- Add a new valid Bundle Stop step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- And I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "BUNDLE"
- And I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search events from devices in account "kapua-sys" and 3 events are found
- Then Bundles are requested
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
- Then KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Configuration Put step and multiple devices
- Create a new job and set connected KuraMock devices as the job targets.
- Add a new valid Configuration Put step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
- And I search events from devices in account "kapua-sys" and 2 events are found
- And I create a job with the name "TestJob"
- And I add targets to job
- When I count the targets in the current scope and I count 2
- And Search for step definition with the name "Configuration Put"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- And I search events from devices in account "kapua-sys" and 3 events are found
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Asset Write step and multiple targets
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Asset Write step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 123 are received
- And I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "ASSET"
- And I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Asset Write"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution items and I confirm the executed jobs is finished within 20 seconds
- And I search events from devices in account "kapua-sys" and 3 events are found
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 1233 are received
- When KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Package Uninstall step and multiple targets
- Create a new job. Set a connected Kura Mock device as a job target.
- Add a new valid Package Uninstall step to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Packages are requested and 1 package is received
- When I search events from devices in account "kapua-sys" and 2 events are found
- And I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Package Uninstall"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events are found
- And Packages are requested and 0 packages are received
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Package Install step and multiple devices
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Package Install step to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 0 and the status PROCESS_OK.
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Then Packages are requested and 1 package is received
- And I search events from devices in account "kapua-sys" and 2 events are found
- And I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Package Download / Install"
- And I prepare a JobStepCreator with the name "TestStep" and the following properties
- | name | type | value |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
- | timeout | java.lang.Long | 30000 |
- When I create a new JobStep from the existing creator
- Then No exception was thrown
- And I start a job
- And I confirm job target has step index 0 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- And I search events from devices in account "kapua-sys" and 3 or more events are found
- When Packages are requested and 2 packages are received
- And KuraMock is disconnected
- And I logout
-
- #************************************************************
- #* Starting a job with multiple Targets and multiple Steps *
- #************************************************************
-
- Scenario: Starting job with valid Command Execution, valid Package Install steps and multiple devices
- Create a new job. Set connected Kura Mock devices as a job targets.
- Add a new valid Command Execution and Package Install steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 0 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Devices status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Command "pwd" is executed
- And Packages are requested and 1 package is received
- When I search events from devices in account "kapua-sys" and 3 events are found
- And The type of the last event is "DEPLOY"
- And I create a job with the name "TestJob"
- And I add targets to job
- And I search for step definition with the name
- | Command Execution |
- | Package Download / Install |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
- | timeout | java.lang.Long | 10000 |
- And I create multiple new JobSteps from the existing creators
- Then No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events are found
- And Packages are requested and 2 packages are received
- When KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Bundle Start and Bundle Stop steps and multiple devices
- Create a new job and set connected KuraMock devices as the job targets.
- Add two new valid Bundle Start and Bundle Stop steps to the created job. Start the job.
- After the executed job is finished, the executed target's step index should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
- When I search events from devices in account "kapua-sys" and 2 events are found
- And The type of the last event is "BUNDLE"
- And I create a job with the name "TestJob"
- And I add targets to job
- And Search for step definition with the name "Bundle Start"
- And I prepare a JobStepCreator with the name "TestStep1" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 34 |
- | timeout | java.lang.Long | 10000 |
- And I create a new JobStep from the existing creator
- Then Search for step definition with the name "Bundle Stop"
- And I prepare a JobStepCreator with the name "TestStep2" and the following properties
- | name | type | value |
- | bundleId | java.lang.String | 77 |
- | timeout | java.lang.Long | 10000 |
- When I create a new JobStep from the existing creator
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- Given I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- When I search events from devices in account "kapua-sys" and 4 events are found
- And Bundles are requested
- Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
- And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
- And KuraMock is disconnected
- And I logout
-
- Scenario: Starting job with valid Configuration Put and Command Execution steps and multiple devices
- Create a new job. Set connected Kura Mock devices as a job targets.
- Add a new valid Configuration Put and Command Execution steps to the created job. Start the job.
- After the executed job is finished, the step index of executed targets should
- be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- And Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
- And Command "pwd" is executed
- When I search events from devices in account "kapua-sys" and 3 events are found
- And The type of the last event is "COMMAND"
- And I create a job with the name "TestJob"
- And I add targets to job
- And I search for step definitions with the name
- | Configuration Put |
- | Command Execution |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
- | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
- | timeout | java.lang.Long | 10000 |
- When I create multiple new JobSteps from the existing creators
- And No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- Then I start a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds
- When I search events from devices in account "kapua-sys" and 5 events are found
- Then Configuration is requested
- And A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
- When KuraMock is disconnected
- And I logout
-
- Scenario: Starting a job with valid Package Uninstall and Asset Write steps and multiple devices
- Create a new job and set a connected KuraMock devices as the job targets.
- Add a new valid Package Uninstall and Asset Write steps to the created job.
- Start the job. After the executed job is finished, the executed target's
- step index should be 1 and the status PROCESS_OK
-
- Given I login as user with name "kapua-sys" and password "kapua-password"
- And I add 2 devices to Kura Mock
- When Devices are connected within 10 seconds
- And I wait 1 second
- Then Device status is "CONNECTED" within 10 seconds
- And I select account "kapua-sys"
- And I get the KuraMock devices after 5 seconds
- And Packages are requested and 1 package is received
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 123 are received
- When I search events from devices in account "kapua-sys" and 3 events are found
- And The type of the last event is "ASSET"
- And I create a job with the name "TestJob"
- And I add targets to job
- And I search for step definitions with the name
- | Package Uninstall |
- | Asset Write |
- And I prepare a JobStepCreator with the name "TestStep1" and properties
- | name | type | value |
- | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
- | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
- | timeout | java.lang.Long | 10000 |
- When I create multiple new JobSteps from the existing creators
- And No exception was thrown
- And I count the JobSteps and I find 2 JobStep within 30 seconds
- And I start a job
- And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
- And I query for the job with the name "TestJob" and I count 1 execution items or more and I confirm the executed jobs are finished within 45 seconds
- When I search events from devices in account "kapua-sys" and 3 or more events are found
- And Device assets are requested
- And Asset with name "asset1" and channel with name "channel1" and value 1233 are received
- And Packages are requested and 0 packages are received
- When KuraMock is disconnected
- And I logout
-
- @teardown
- Scenario: Tear down test resources
- Given Stop Docker environment
- And Clean Locator Instance
diff --git a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStopOnlineDeviceI9n.feature b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStopOnlineDeviceI9n.feature
deleted file mode 100644
index bd4438cacf9..00000000000
--- a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceStopOnlineDeviceI9n.feature
+++ /dev/null
@@ -1,518 +0,0 @@
-###############################################################################
-# Copyright (c) 2019, 2024 Eurotech and/or its affiliates and others
-#
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Eurotech - initial API and implementation
-###############################################################################
-@env_docker
-@it
-@jobEngineServiceStop
-
-Feature: JobEngineService stop job tests with online device
- Job Engine Service test scenarios for stopping job. This feature file contains scenarios for stopping job with one target and one step,
- one target and multiple steps, multiple targets and one step and multiple targets and multiple steps.
-
- @setup
- Scenario: Setup test resources
- Given Init Security Context
- And Start Docker environment with resources
- | db |
- | events-broker |
- | job-engine |
- | message-broker |
- | broker-auth-service |
- | consumer-lifecycle |
-
- # *****************************************************
- # * Stopping a job with one Target and multiple Steps *
- # *****************************************************
-
-# Scenario: Stop job with multiple Bundle Start and Package Install steps and one target
-# Create a new job and set a connected KuraMock device as the job target.
-# Add Bundle Start and Package Install steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 1 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 1, and the status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I start the Kura Mock
-# And Device is connected within 10 seconds
-# And Device status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock device after 5 seconds
-# And Bundles are requested
-# Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
-# And Packages are requested and 1 package is received
-# When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add target to job
-# And I search for the job targets in database
-# And I count 1
-# And I search for step definition with the name
-# | Bundle Start |
-# | Package Download / Install |
-# | Package Uninstall |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | bundleId | java.lang.String | 34 |
-# | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
-# | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 3 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is different than 2 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 2 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# When Bundles are requested
-# Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
-# And Packages are requested and 2 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# Scenario: Stop job with multiple Bundle Stop and Package Uninstall steps and one target
-# Create a new job and set a connected KuraMock device as the job target.
-# Add two Bundle Stop and Package Uninstall steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 2 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 2, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I start the Kura Mock
-# And Device is connected within 10 seconds
-# And Device status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock device after 5 seconds
-# And Bundles are requested
-# And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
-# And Packages are requested and 1 package is received
-# When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add target to job
-# And I search for the job targets in database
-# And I count 1
-# And I search for step definition with the name
-# | Bundle Stop |
-# | Package Uninstall |
-# | Package Download / Install |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | bundleId | java.lang.String | 77 |
-# | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
-# | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 3 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is different than 2 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 2 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# When Bundles are requested
-# And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
-# And Packages are requested and 2 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# Scenario: Stop job with multiple Command Execution and Package Install steps and one target
-# Create a new job and set a connected KuraMock device as the job target.
-# Add two Command Execution and Package Install steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 1 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 1, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I start the Kura Mock
-# And Device is connected within 10 seconds
-# And Device status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock device after 5 seconds
-# And Command "pwd" is executed
-# And Packages are requested and 1 package is received
-# When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add target to job
-# And I search for the job targets in database
-# And I count 1
-# And I search for step definition with the name
-# | Command Execution |
-# | Package Download / Install |
-# | Package Uninstall |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
-# | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
-# | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 3 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is different than 2 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 2 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# And Packages are requested and 2 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# Scenario: Stop job with multiple Configuration Put and Package Uninstall steps and one target
-# Create a new job and set a connected KuraMock device as the job target.
-# Add two Configuration Put and Package Uninstall steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 1 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 1, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I start the Kura Mock
-# And Device is connected within 10 seconds
-# And Device status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock device after 5 seconds
-# And Configuration is requested
-# Then A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
-# And Packages are requested and 1 packages is received
-# When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add target to job
-# And I search for the job targets in database
-# And I count 1
-# And I search for step definition with the name
-# | Configuration Put |
-# | Package Uninstall |
-# | Package Download / Install |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
-# | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
-# | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 3 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is different than 2 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 2 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# Then Packages are requested and 2 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# Scenario: Stop job with multiple Asset Write and Package Install steps and one target
-# Create a new job and set a connected KuraMock device as the job target.
-# Add two Asset Write and Package Install steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 1 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 1, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I start the Kura Mock
-# And Device is connected within 10 seconds
-# And Device status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock device after 5 seconds
-# When Device assets are requested
-# Then Asset with name "asset1" and channel with name "channel1" and value 123 are received
-# And Packages are requested and 1 package is received
-# When I search for events from device "rpione3" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add target to job
-# And I search for the job targets in database
-# And I count 1
-# And I search for step definition with the name
-# | Asset Write |
-# | Package Download / Install |
-# | Package Uninstall |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
-# | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
-# | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 3 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is different than 2 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 2 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# When Device assets are requested
-# Then Asset with name "asset1" and channel with name "channel1" and value 1233 are received
-# And Packages are requested and 2 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# # *****************************************************
-# # * Stopping a job with multiple Targets and one Step *
-# # *****************************************************
-#
-# Scenario: Stop job with multiple targets and Bundle Start and Package Install steps
-# Create a new job and set a connected KuraMock devices as the job targets.
-# Add Bundle Start and Package Install steps to the created job. Start the job. Before
-# job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 0 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 0, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I add 2 devices to Kura Mock
-# And Devices are connected within 10 seconds
-# And I wait 1 second
-# And Devices status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock devices after 5 seconds
-# And Bundles are requested
-# Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "RESOLVED"
-# And Packages are requested and 1 package is received
-# When I search for events from device "device0" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add targets to job
-# And I search for the job targets in database
-# And I count 2
-# And I search for step definition with the name
-# | Bundle Start |
-# | Package Download / Install |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | bundleId | java.lang.String | 34 |
-# | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
-# And I create multiple new JobSteps from the existing creators
-# And I count the JobSteps and I find 2 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is 0 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# When Bundles are requested
-# Then A bundle named "slf4j.api" with id 34 and version "1.7.21" is present and "ACTIVE"
-# And Packages are requested and 2 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# Scenario: Stop job with multiple targets and Bundle Stop and Package Uninstall steps
-# Create a new job and set a connected KuraMock devices as the job targets.
-# Add Bundle Stop and Package Uninstall steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 0 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 0, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I add 2 devices to Kura Mock
-# And Devices are connected within 10 seconds
-# And I wait 1 second
-# And Devices status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock devices after 5 seconds
-# And Bundles are requested
-# And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "ACTIVE"
-# And Packages are requested and 1 package is received
-# When I search for events from device "device0" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add targets to job
-# And I search for the job targets in database
-# And I count 2
-# And I search for step definition with the name
-# | Bundle Stop |
-# | Package Uninstall |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | bundleId | java.lang.String | 77 |
-# | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 2 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is 0 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# When Bundles are requested
-# And A bundle named "org.eclipse.kura.linux.bluetooth" with id 77 and version "1.0.300" is present and "RESOLVED"
-# And Packages are requested and 0 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# Scenario: Stop job with multiple targets and Command Execution and Package Install steps
-# Create a new job and set a connected KuraMock devices as the job targets.
-# Add Command Execution and Package Install steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 0 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 0, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I add 2 devices to Kura Mock
-# And Devices are connected within 10 seconds
-# And I wait 1 second
-# And Devices status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock devices after 5 seconds
-# And Command "pwd" is executed
-# And Packages are requested and 1 package is received
-# When I search for events from device "device0" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add targets to job
-# And I search for the job targets in database
-# And I count 2
-# And I search for step definition with the name
-# | Command Execution |
-# | Package Download / Install |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | commandInput | org.eclipse.kapua.service.device.management.command.DeviceCommandInput | pwd30000false |
-# | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 2 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is 0 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# When Packages are requested and 2 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# Scenario: Stop job with multiple targets and Configuration Put and Package Uninstall steps
-# Create a new job and set a connected KuraMock devices as the job targets.
-# Add Configuration Put and Package Uninstall steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 0 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 0, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I add 2 devices to Kura Mock
-# And Devices are connected within 10 seconds
-# And I wait 1 second
-# And Devices status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock devices after 5 seconds
-# And Configuration is requested
-# Then A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "5"
-# And Packages are requested and 1 packages is received
-# When I search for events from device "device0" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add targets to job
-# And I search for the job targets in database
-# And I count 2
-# And I search for step definition with the name
-# | Configuration Put |
-# | Package Uninstall |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | configuration | org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration | org.eclipse.kura.clock.ClockService>0.pool.ntp.orgjava-ntp12303600truetrue1000010 |
-# | packageUninstallRequest | org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest | org.eclipse.kura.example.beacon1.0.300true10000 |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 2 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is 0 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# And Configuration is requested
-# Then A Configuration named "org.eclipse.kura.clock.ClockService" has property "clock.ntp.retry.interval" with value "10"
-# And Packages are requested and 0 packages are received
-# Then KuraMock is disconnected
-# And I logout
-#
-# Scenario: Stop job with multiple targets and Asset Write and Package Install steps and one target
-# Create a new job and set a connected KuraMock device as the job target.
-# Add two Asset Write and Package Install steps to the created job. Start the job.
-# Before job is finished, stop the job. When job is stopped, the executed target's
-# step index should be different than 1 and the status PROCESS_AWAITING. Start the job again.
-# If job is finished step index should be 1, and job target status PROCESS_OK.
-#
-# Given I login as user with name "kapua-sys" and password "kapua-password"
-# And I add 2 devices to Kura Mock
-# And Devices are connected within 10 seconds
-# And I wait 1 second
-# And Devices status is "CONNECTED" within 10 seconds
-# And I select account "kapua-sys"
-# And I get the KuraMock devices after 5 seconds
-# When Device assets are requested
-# Then Asset with name "asset1" and channel with name "channel1" and value 123 are received
-# And Packages are requested and 1 package is received
-# When I search for events from device "device0" in account "kapua-sys" I find 3 events within 30 seconds
-# And The type of the last event is "DEPLOY"
-# And I create a job with the name "TestJob"
-# And I add targets to job
-# And I search for the job targets in database
-# And I count 2
-# And I search for step definition with the name
-# | Asset Write |
-# | Package Download / Install |
-# And I prepare a JobStepCreator with the name "TestStep1" and properties
-# | name | type | value |
-# | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | asset1java.lang.Integer1233channel1 |
-# | packageDownloadRequest | org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest | http://download.eclipse.org/kura/releases/3.2.0/org.eclipse.kura.example.publisher_1.0.300.dpExample Publisher1.0.300true |
-# | timeout | java.lang.Long | 10000 |
-# And I create multiple new JobSteps from the existing creators
-# Then No exception was thrown
-# And I count the JobSteps and I find 2 JobStep within 30 seconds
-# And I start a job
-# And I wait for 10 milliseconds for processes to settle down
-# And I stop the job
-# And I search for the last job target in the database
-# And I confirm the step index is different than 1 and status is "PROCESS_AWAITING"
-# And I start a job
-# And I confirm job target has step index 1 and status "PROCESS_OK" within 31 seconds
-# When I query for the execution items for the current job and I count 2 or more finished within 30 seconds
-# When Device assets are requested
-# Then Asset with name "asset1" and channel with name "channel1" and value 1233 are received
-# And Packages are requested and 2 packages are received
-# Then KuraMock is disconnected
-# And I logout
-
- @teardown
- Scenario: Tear down test resources
- Given Stop Docker environment
- And Clean Locator Instance
diff --git a/qa/integration/src/test/resources/features/jobScheduling/TriggerServiceI9n.feature b/qa/integration/src/test/resources/features/jobScheduling/TriggerServiceI9n.feature
index 826e80e5099..c6287f9a3f7 100644
--- a/qa/integration/src/test/resources/features/jobScheduling/TriggerServiceI9n.feature
+++ b/qa/integration/src/test/resources/features/jobScheduling/TriggerServiceI9n.feature
@@ -11,7 +11,7 @@
# Eurotech - initial API and implementation
###############################################################################
@env_docker_base
-@job
+@jobsIntegration
Feature: Trigger service tests
diff --git a/service/job/test/src/test/resources/features/JobService.feature b/service/job/test/src/test/resources/features/JobService.feature
index ba0d03a8d68..db2f4ee27d4 100644
--- a/service/job/test/src/test/resources/features/JobService.feature
+++ b/service/job/test/src/test/resources/features/JobService.feature
@@ -10,7 +10,7 @@
# Contributors:
# Eurotech - initial API and implementation
###############################################################################
-@jobs
+@job
@jobService
@env_none
diff --git a/service/job/test/src/test/resources/features/JobStepDefinitionService.feature b/service/job/test/src/test/resources/features/JobStepDefinitionService.feature
index f689773cb82..72f1c034e00 100644
--- a/service/job/test/src/test/resources/features/JobStepDefinitionService.feature
+++ b/service/job/test/src/test/resources/features/JobStepDefinitionService.feature
@@ -10,7 +10,7 @@
# Contributors:
# Eurotech - initial API and implementation
###############################################################################
-@jobs
+@job
@jobStepDefinition
@env_none
diff --git a/service/job/test/src/test/resources/features/JobStepService.feature b/service/job/test/src/test/resources/features/JobStepService.feature
index cac6289d9b1..770c338bdd5 100644
--- a/service/job/test/src/test/resources/features/JobStepService.feature
+++ b/service/job/test/src/test/resources/features/JobStepService.feature
@@ -10,7 +10,7 @@
# Contributors:
# Eurotech - initial API and implementation
###############################################################################
-@jobs
+@job
@jobStepService
@env_none