Shared Java library for plugins that integrate with Opentext enterprise Performance Engineering / Performance Center through REST APIs.
- A reusable REST client implementation (
PcRestProxy) for enterprise Performance Engineering operations. - Common entities for requests/responses (runs, scripts, tests, trend reports, etc.).
- YAML/XML-to-entity conversion helpers for creating or updating tests.
- Unit tests for parsing, conversion, and request behavior.
- Integration tests for live-server workflows (upload, run lifecycle, start-failure scenarios).
The library is published to Maven Central under the coordinates com.microfocus.adm.performancecenter:plugins-common.
- Sonatype Central (source of truth): https://central.sonatype.com/artifact/com.microfocus.adm.performancecenter/plugins-common
- This is the authoritative listing and reflects the latest published versions.
- MVNRepository (mirror): https://mvnrepository.com/artifact/com.microfocus.adm.performancecenter/plugins-common
- This is a third-party mirror that indexes Maven Central. It can lag behind and may not be in sync (for example, a recently published version such as
1.2.2or1.2.3may not yet appear here). For the current state always refer to Sonatype Central.
- This is a third-party mirror that indexes Maven Central. It can lag behind and may not be in sync (for example, a recently published version such as
<dependency>
<groupId>com.microfocus.adm.performancecenter</groupId>
<artifactId>plugins-common</artifactId>
<version>1.2.4</version>
</dependency>implementation 'com.microfocus.adm.performancecenter:plugins-common:1.2.4'The main API contract is PcRestProxyClient in:
src/main/java/com/microfocus/adm/performancecenter/plugins/common/rest/PcRestProxyClient.java
-
Authentication/session
authenticate(...),logout()- Opens and closes authenticated sessions.
-
Run lifecycle
startRun(...),stopRun(...),getRunData(...)- Starts runs, stops runs, and polls run state.
-
Run artifacts and logs
getRunResults(...),GetRunResultData(...),getRunEventLog(...)- Retrieves result files and event log records.
-
Script management
uploadScript(...),getScript(...),getScripts(),deleteScript(...)- Uploads scripts and manages script inventory.
-
Test plan folders
getTestPlanFolders(),verifyTestPlanFolderExist(...),createTestPlanFolder(...),createTestPlanFolders(...)- Navigates and creates folder structures in the test plan.
-
Performance test definitions
createOrUpdateTestFromYamlContent(...),createOrUpdateTestFromYamlTest(...),createOrUpdateTest(...),updateTest(...),getTest(...),deleteTest(...)- Creates/updates tests from YAML, XML, or entity objects.
-
Test instances and timeslots
getAllTestSets(),getTestInstancesByTestId(...),createTestInstance(...),GetOpenTimeslotsByTestId(...)- Resolves where and when runs can execute.
-
Trend reporting
getTrendReportByXML(...),updateTrendReport(...),getTrendingPDF(...),getTrendReportMetaData(...)- Reads and updates trend report artifacts.
-
Helpers
extractTestIdFromString(...),readYaml(...),GetPcServer(),GetTenant()- Utility methods for parsing and context access.
The transport protocol is supplied by the caller when constructing PcRestProxy
(the webProtocolName argument, typically "https" or "http").
- HTTPS is recommended for all real and production environments. Credentials (Basic authentication and token-based authentication) and session cookies are only protected in transit when HTTPS is used.
- HTTP is allowed but not recommended. It is supported on purpose so that customers can evaluate OpenText Enterprise Performance Engineering (LoadRunner Enterprise) in development/test environments that do not have an SSL certificate configured. Over plain HTTP, credentials and cookies are transmitted unencrypted; do not use HTTP outside of isolated, non-production environments.
Every method declared in PcRestProxyClient is documented below. Methods marked
@Deprecated are retained for backward compatibility; prefer the lower-case named
replacements.
boolean authenticate(String userName, String password)- Opens an authenticated session. When the proxy is configured for token authentication,
userName/passwordare the client id key and secret key; otherwise they are the ALM user name and password. Returnstrueon success.
- Opens an authenticated session. When the proxy is configured for token authentication,
boolean logout()- Closes the authenticated session. Returns
trueon success.
- Closes the authenticated session. Returns
String GetPcServer()- Returns the resolved enterprise Performance Engineering server (host) the proxy targets.
String GetTenant()- Returns the resolved tenant suffix associated with the server, or an empty string when no tenant is present.
PcRunResponse startRun(int testId, int testInstanceId, TimeslotDuration timeslotDuration, String postRunAction, boolean vudsMode, int timeslot)- Starts a performance run for the given test and test instance, using the supplied timeslot duration, post-run action, VUDs mode, and timeslot id. Returns the created run (including its id and state).
boolean stopRun(int runId, String stopMode)- Stops the run identified by
runIdusing the given stop mode (for example a graceful or immediate stop). Returnstrueon success.
- Stops the run identified by
PcRunResponse getRunData(int runId)- Returns the current data/state for the specified run.
PcRunResults getRunResults(int runId)- Returns the collection of result artifacts available for the run.
boolean GetRunResultData(int runId, int resultId, String localFilePath)- Downloads a single run result (identified by
resultId) tolocalFilePath. Returnstrueon success.
- Downloads a single run result (identified by
PcRunEventLog getRunEventLog(int runId)- Returns the event log records produced during the run.
int uploadScript(String testFolderPath, boolean overwrite, boolean runtimeOnly, boolean keepCheckedOut, String scriptPath)- Uploads the script at
scriptPathinto the test plan foldertestFolderPath. Flags control overwrite behavior, runtime-only upload, and whether the script is kept checked out. Returns the new script id.
- Uploads the script at
PcScripts getScripts()- Returns all scripts visible in the current project.
PcScript getScript(int Id)- Returns the script identified by its numeric id.
PcScript getScript(String testFolderPath, String scriptName)- Returns the script located by folder path and script name.
boolean deleteScript(int scriptId)- Deletes the script identified by
scriptId. Returnstrueon success.
- Deletes the script identified by
PcTestPlanFolders getTestPlanFolders()- Returns the test plan folder structure for the project.
boolean verifyTestPlanFolderExist(String path)- Returns
trueif the test plan folder atpathexists.
- Returns
PcTestPlanFolder createTestPlanFolder(String existingPath, String name)- Creates a folder named
nameunder the already existing folderexistingPathand returns it.
- Creates a folder named
ArrayList<PcTestPlanFolder> createTestPlanFolders(String[] paths)- Creates all folders required by the supplied full
paths, creating intermediate folders as needed, and returns the created folders.
- Creates all folders required by the supplied full
ArrayList<PcTestPlanFolder> createPcTestPlanFolders(ArrayList<String[]> stringsOfExistingPathFromSubjectAndOfFolderToCreate)- Lower-level variant of
createTestPlanFoldersthat accepts, for each folder, a[existingParentPath, folderNameToCreate]pair. Returns the created folders.
- Lower-level variant of
Test createOrUpdateTestFromYamlTest(String testString)- Creates or updates a test from a full YAML test definition (name, folder, and content in one document). Returns the resulting test.
Test createOrUpdateTestFromYamlContent(String testName, String testFolderPath, String testOrContent)- Creates or updates the test named
testNameundertestFolderPathfrom a YAML content (or test) document. Returns the resulting test.
- Creates or updates the test named
Test createOrUpdateTest(String testName, String testFolderPath, String xml)- Creates or updates the test named
testNameundertestFolderPathfrom an XML content document. Returns the resulting test.
- Creates or updates the test named
Test createOrUpdateTest(String testName, String testFolderPath, Content content)- Creates or updates the test named
testNameundertestFolderPathfrom aContententity. Returns the resulting test.
- Creates or updates the test named
Test getTest(int testId)- Returns the full test definition for
testId.
- Returns the full test definition for
PcTest getTestData(int testId)- Returns metadata for the test identified by
testId.
- Returns metadata for the test identified by
Test updateTest(int testId, Content content)- Replaces the content of an existing test identified by
testId. Returns the updated test.
- Replaces the content of an existing test identified by
boolean deleteTest(int testId)- Deletes the test identified by
testId. Returnstrueon success.
- Deletes the test identified by
PcTestSets getAllTestSets()- Returns all test sets in the project.
PcTestSets GetAllTestSets()(deprecated)- Deprecated alias for
getAllTestSets().
- Deprecated alias for
PcTestInstances getTestInstancesByTestId(int testId)- Returns the test instances associated with
testId.
- Returns the test instances associated with
int createTestInstance(int testId, int testSetId)- Creates a test instance linking
testIdto the test settestSetId. Returns the new test instance id.
- Creates a test instance linking
PcTestSetFolders getTestSetFolders()- Returns the test set folder structure for the project.
PcTestSetFolder createTestSetFolder(int parentId, String name)- Creates a test set folder named
nameunder the folderparentIdand returns it.
- Creates a test set folder named
PcTestSet createTestSet(String testSetName, int testSetParentId, String testSetComment)- Creates a test set named
testSetNameundertestSetParentIdwith the supplied comment and returns it.
- Creates a test set named
PcTestSet createTestSet(String testSetName, int testSetParentId)(default)- Convenience overload that creates a test set with an empty comment.
Timeslots GetOpenTimeslotsByTestId(int testId)- Returns the open timeslots available for
testId.
- Returns the open timeslots available for
int addTrendReport(String name, String description)- Creates a trend report with the given name and description. Returns the new trend report id.
int addTrendReport(String name)(default)- Convenience overload that creates a trend report with an empty description.
TrendReportTransactionDataRoot getTrendReportByXML(String trendReportId, int runId)- Returns the transaction-level trend report data for the given trend report and run.
boolean updateTrendReport(String trendReportId, TrendReportRequest trendReportRequest)- Updates the trend report identified by
trendReportIdwith the supplied request. Returnstrueon success.
- Updates the trend report identified by
InputStream getTrendingPDF(String trendReportId)- Returns the trend report rendered as a PDF stream. The caller is responsible for closing the stream.
ArrayList<PcTrendedRun> getTrendReportMetaData(String trendReportId)- Returns metadata describing the runs included in the trend report.
int extractTestIdFromString(String value)- Extracts a test id encoded inside a string (for example
ID:'123'). Returns0when no id is found.
- Extracts a test id encoded inside a string (for example
Content readYaml(String yamlContent)- Parses a YAML content document into a
Contententity.
- Parses a YAML content document into a
- Unit tests guide:
src/test/resources/microfocus/adm/performancecenter/plugins/common/rest/UNIT_TESTS_GUIDE.md
- Integration tests guide:
src/test/resources/microfocus/adm/performancecenter/plugins/common/rest/INTEGRATION_TESTS_GUIDE.md
cd "C:\Git\plugin\performance-center-plugins-common"
mvn test -qFor integration test execution and skip behavior, follow the integration guide above.
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.0com.fasterxml.jackson.core:jackson-databind:2.22.0org.apache.commons:commons-lang3:3.20.0(test scope)
Audit artifacts generated for this baseline are under:
.github/java-upgrade/release-1.2.2/deps.txt.github/java-upgrade/release-1.2.2/deps-full.txt.github/java-upgrade/release-1.2.2/build.log