Library scope: | GLOBAL |
---|
RestPerfClient handling singleton resource.
Copyright (c) 2016,2017 Cisco Systems, Inc. and others. All rights reserved.
This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
This singleton manages RestPerfClient invocation, tracks the log file produced by the invocation, allows the test suite to easily search this log file and collect it once done.
TODO: RemoteBash.robot contains logic which could be reused here.
TODO: Currently only one RestPerfClient invocation running at a time is supported. Support for multiple concurrently running RestPerfClient invocations might be needed for example when performance testing cluster nodes. However no such suites are planned for now.
FIXME: There may be suites which want to use this Resource without NetconfKeywords, in which case NexusKeywords will not be initialized and Setup_Restperfclient will fail. Fixing this problem will require updating NexusKeywords initialization (which may break other suites) and currently all suites using this use also NetconfKeywords so this was postponed. Workaround for the problem: Initialize NexusKeywords manually before initializing this resource.
Collect useful data produced by restperfclient
Search for the specified string in the log file produced by latest invocation of RestPerfClient
Invoke RestPerfClient on the specified URL with the specified timeout. Assemble the RestPerfClient invocation commad, setup the specified timeout for the SSH connection, invoke the assembled command and then check that RestPerfClient finished its run correctly.
Deploy RestPerfClient and determine the Java command to use to call it. Open a SSH connection through which the RestPerfClient will be invoked, deploy RestPerfClient and the data files it needs to do its work and initialize the internal state for the remaining keywords.
Free resources allocated during the RestPerfClient setup