{"id":23651974,"url":"https://github.com/microfocus/alm-octane-bulk-test-updater","last_synced_at":"2025-11-16T20:30:15.901Z","repository":{"id":44860068,"uuid":"222488841","full_name":"MicroFocus/alm-octane-bulk-test-updater","owner":"MicroFocus","description":"Utility for bulk adding a release to latest test versions of tests. Tests can be filtered by application module and test versions can be filtered by the name of the version","archived":false,"fork":false,"pushed_at":"2022-12-29T02:27:05.000Z","size":73,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-28T16:49:16.841Z","etag":null,"topics":["octane"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MicroFocus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-18T16:04:33.000Z","updated_at":"2019-12-15T13:01:05.000Z","dependencies_parsed_at":"2023-01-31T07:45:28.498Z","dependency_job_id":null,"html_url":"https://github.com/MicroFocus/alm-octane-bulk-test-updater","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Falm-octane-bulk-test-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Falm-octane-bulk-test-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Falm-octane-bulk-test-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Falm-octane-bulk-test-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MicroFocus","download_url":"https://codeload.github.com/MicroFocus/alm-octane-bulk-test-updater/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239611993,"owners_count":19668274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["octane"],"created_at":"2024-12-28T16:49:33.779Z","updated_at":"2025-11-16T20:30:15.851Z","avatar_url":"https://github.com/MicroFocus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bulk test version updater \nThis project provides a script which can be used to update the latest version of all the tests in Octane\n\n## Table of content\n1. [Prerequisites](#Prerequisites)\n2. [Installation](#Installation)\n3. [Configuration File](#Configuration-File)\n4. [Limitations](#Limitations)\n5. [Running](#Running)\n\n## Prerequisites\n[Node JS](https://nodejs.org/en/download/) - version 8.11.3 or above\n\nOctane - version 15.0.20.54 or above\n\n## Installation\nAll the commands should be run from the root of the project\n1. Run `npm install` \n2. Make the necessary changes in the configuration file: \n[configuration.json](#Configuration-file)\n3. Run the `node scripts/sdk-setup.js` command. This command [updates the client API\n](https://github.com/MicroFocus/alm-octane-js-rest-sdk#update-client-api) of the octane sdk.\n\n## Configuration File\nThe configuration file is a **JSON** which has the following structure:\n``` \n{\n  \"server\": {\n    \"protocol\": \"http\",\n    \"host\": \"\u003cMY_OCTANE_SERVER\u003e\",\n    \"port\": \u003cPORT\u003e,\n    \"proxy\": \"\u003cPROXY_USED_TO_REACH_OCTANE\u003e\",\n    \"shared_space_id\": \u003cSHARED_SPACE_ID\u003e,\n    \"workspace_id\": \u003cWORKSPACE_ID\u003e\n  },\n  \"authentication\": {\n    \"username\": \"\u003cAPI_CLIENT_ID_OR_USERNAME\u003e\",\n    \"password\": \"\u003cAPI_CLIENT_SECRET_OR_PASSWORD\u003e\"\n  },\n  \"maxPageSize\": \u003cOCTANE_MAX_PAGE_SIZE\u003e,\n  \"versionToUpdate\": false\n}\n```\n\nIf an *OPTIONAL* field is not needed, it should not be present in the configuration file when running the script.\n\n\n| Field name | Value | Description |\n| --- | --- | --- |\n  server | JSON with the fields described below | All the information about the octane server \n  |├⇢ protocol |String | The protocol of the octane server (e.g. \"http\"/\"https\")\n  |├⇢ host | String | The host of the octane server (e.g. \"myOctaneServer.com\")  \n  |├⇢ port| Integer | *OPTIONAL* The port of the octane server (e.g. 8080). Needed only if the octane server url has a port. \n  |├⇢ proxy | String | *OPTIONAL* Used if a proxy is needed to reach octane (e.g. \"http://myProxyServer:port\")\n  |├⇢ shared_space_id | Integer | The id of the shared space for which the script should run (e.g. 1001) \n  |└⇢ workspace_id | Integer | The id of the workspace for which the script should run (e.g. 1002) \n  |authentication|JSON with the fields described below| Either an [API client id and secret](https://admhelp.microfocus.com/octane/en/latest/Online/Content/AdminGuide/how_setup_APIaccess.htm) pair or a username and password pair  with the role of at least \"Team Member\" in the workspace with id `workspace_id`  \n  |├⇢ username| String | The API client id or username with the role of at least \"Team Member\" in the desired workspace  \n  |└⇢ password| String | The API client secret or password \n  |versionToUpdate | String | The Name (in the version column of the test version) of the tests which should be updated. The `*` can be used as a [wild card](https://admhelp.microfocus.com/octane/en/latest/Online/Content/API/query_Clause.htm). An empty string `\"\"` will result in the latest version of the test being updated. Using `\"*\"` will update the latest named version.    \n  |maxPageSize | Integer | *OPTIONAL* This field should be equal to the MAX_PAGE_SIZE [site parameter](https://admhelp.microfocus.com/octane/en/latest/Online/Content/AdminGuide/params.htm). The default value used is the same as the octane default value (20000).    \n\n\n  ![Named vs Unnamed version](/images/Named%20vs%20Unnamed.png)\n  \n\n## Limitations\n   The script has the following limitations:\n   * If new versions of tests are created (including creation of new tests) while the script is running, they will not \n   be considered for the current run of the script and thus will not be updated. \n   * If a user manually updates a revision that would also be updated by the script \n   (e.g. manually adding a release to the latest revision of a test), the user or the script updates might \n   not be saved depending on the order of the updates.\n   \n   Because of these limitations, we recommend that all the version views of all the tests be\n   closed before running the script and no new versions of the tests are created while the script is \n   running.   \n     \n## Running\n The script can accept the following parameters:\n \n  | Name | Argument prefix | Value | Default Interpretation | Description |\n  | ---- | --------------- | ----- | ---------------------- | ----------- |\n  |Release |  `--release` or `-r` or no prefix | **String** - The name of the release OR **Integer** - The id of the release | The default release will be ued to update the tests | The release which will be added to the latest version (according to the [configuration file](#Configuration-file)) of every test script\n  |Application Module | `--appModule` or `-a` | **Integer** - The id of an application module OR `root` OR `unassigned` OR `all` | All the tests will be considered | If this parameter is present, only tests assigned to the selected application module and its descendants will be updated. When using `root` only tests that have an application module assigned will be updated. When using `unassigned`, only tests which are not assigned to any application module will be updated. Using `all` is the same as using the default interpretation   \n  |Strict Application Module | `--useStrictAppModule` or `-s` | **Boolean** | The tests belonging to the descendants of the given application module will also be updated | **True** - if the application module is given as an id, only tests from the exact application module will be updated (no descendants). **False** - same as using the default interpretation.\n \n \n All the command line parameters can also be taken from the JSON configuration file \n using the full prefix and the value of the parameter(e.g. `\"release\": 1001`). If a parameter is not given as a command \n line argument, the configuration file will be checked for the value of that parameter and if that parameter is not \n found in the configuration file, the default interpretation of the value will be used. Setting a parameter in \n the configuration file will prevent the \"default interpretation\" of that parameter, but this way a custom default \n value can be set.\n \n After the [installation](#Installation), the script can be run with one of the following command from the root \n of the project:  `node src/bulk_update_test_versions.js`.\n        \n  Because the release parameter has 3 ways of giving the argument prefix, the following commands are equivalent and \n  they all update the tests with the release `Release 1` with id `1001`    \n  * using the ID:\n  \n        node src/bulk_update_test_versions.js 1001\n        node src/bulk_update_test_versions.js -r 1001\n        node src/bulk_update_test_versions.js --release 1001\n  \n  * using the name of the release :\n  \n        node src/bulk_update_test_versions.js \"Release 1\"\n        node src/bulk_update_test_versions.js -r \"Release 1\"\n        node src/bulk_update_test_versions.js --release \"Release 1\"\n  \n  Here are other examples of using the command line arguments with an application module with id 2002:   \n  * `node src/bulk_update_test_versions.js -a 2002` - updates the tests belonging to the application module \n  with the id 2002 and all its descendants with the default release\n  * `node src/bulk_update_test_versions.js -sa 2002`- updates the tests belonging to the application module \n  with the id 2002 with the default release. The tests belonging to the descendants of the application module will not be updated.\n  * `node src/bulk_update_test_versions.js \"Release 1\" -sa 2002` updates the tests belonging to the application \n  module with the id 2002 with the release \"Release 1\". The tests belonging to the descendants of the application \n  module will not be updated.\n      \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrofocus%2Falm-octane-bulk-test-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrofocus%2Falm-octane-bulk-test-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrofocus%2Falm-octane-bulk-test-updater/lists"}