public abstract class MLBaseTest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.wso2.carbon.automation.engine.context.beans.Instance |
instance |
protected org.wso2.carbon.automation.engine.context.AutomationContext |
mlAutomationContext |
protected org.wso2.carbon.automation.engine.context.beans.Tenant |
tenantInfo |
protected org.wso2.carbon.automation.engine.context.beans.User |
userInfo |
protected org.wso2.carbon.automation.engine.context.TestUserMode |
userMode |
| Constructor and Description |
|---|
MLBaseTest() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
createAnalysis(String name,
int projectId)
Creates an analysis with given specification and keep a reference to the id.
|
protected int |
createDataset(String name,
String version,
String dataset)
Creates a dataset with given specification and keep a reference to the id.
|
protected int |
createDatasetFromDASTable(String name,
String version,
String table)
Creates a dataset with given specification and keep a reference to the id.
|
protected String |
createModel(int analysisId,
int versionSetId)
Creates a model with given specification and keep a reference to the id.
|
protected int |
createProject(String name,
String datasetName)
Creates a project with given specification and keep a reference to the id.
|
protected void |
destroy() |
protected String |
getCarbonLoginURL()
Get the URL of the carbon console login
|
protected MLHttpClient |
getMLHttpClient() |
protected String |
getMLUiUrl()
Get the web-app URL
|
protected int |
getModelId(String modelName) |
protected static String |
getModelStorageDirectory()
Retrieves the absolute path of the model storage directory
|
protected String |
getServiceUrlHttp(String serviceName)
Get the non-secured URL of a given service.
|
protected String |
getServiceUrlHttps(String serviceName)
Get the secured URL of a given service.
|
protected int |
getVersionSetId(int datasetId,
String version) |
protected List<Integer> |
getVersionSetIds() |
protected void |
init() |
protected boolean |
isDatasetProcessed(int versionSetId,
long timeout,
int frequency) |
protected void |
testExportAsPMML(int modelId)
A test case for exporting a model in pmml format
|
protected void |
testPublishAsPMML(int modelId)
A test case for publishing a model to registry in pmml format
|
protected void |
validateServiceUrl(String serviceUrl,
org.wso2.carbon.automation.engine.context.beans.Tenant tenant)
Checks whether the URl is a valid one for the tenant.
|
protected org.wso2.carbon.automation.engine.context.AutomationContext mlAutomationContext
protected org.wso2.carbon.automation.engine.context.beans.Tenant tenantInfo
protected org.wso2.carbon.automation.engine.context.beans.User userInfo
protected org.wso2.carbon.automation.engine.context.TestUserMode userMode
protected org.wso2.carbon.automation.engine.context.beans.Instance instance
protected void init()
throws MLIntegrationBaseTestException
MLIntegrationBaseTestExceptionprotected MLHttpClient getMLHttpClient()
protected int createDataset(String name, String version, String dataset) throws MLHttpClientException, IOException, org.json.JSONException
MLHttpClientExceptionIOExceptionorg.json.JSONExceptionprotected int createDatasetFromDASTable(String name, String version, String table) throws MLHttpClientException, IOException, org.json.JSONException
MLHttpClientExceptionIOExceptionorg.json.JSONExceptionprotected int createProject(String name, String datasetName) throws MLHttpClientException, IOException
MLHttpClientExceptionIOExceptionprotected int createAnalysis(String name, int projectId) throws MLHttpClientException, IOException
MLHttpClientExceptionIOExceptionprotected String createModel(int analysisId, int versionSetId) throws MLHttpClientException, IOException
MLHttpClientExceptionIOExceptionprotected boolean isDatasetProcessed(int versionSetId,
long timeout,
int frequency)
protected int getModelId(String modelName) throws MLHttpClientException
MLHttpClientExceptionprotected int getVersionSetId(int datasetId,
String version)
throws MLHttpClientException
MLHttpClientExceptionprotected String getServiceUrlHttp(String serviceName) throws MLIntegrationBaseTestException
serviceName - Name of the service of which URL is needed.MLIntegrationBaseTestExceptionprotected String getServiceUrlHttps(String serviceName) throws MLIntegrationBaseTestException
serviceName - Name of the service of which URL is needed.MLIntegrationBaseTestExceptionprotected String getCarbonLoginURL() throws MLIntegrationBaseTestException
MLIntegrationBaseTestExceptionprotected String getMLUiUrl() throws MLIntegrationBaseTestException
MLIntegrationBaseTestExceptionprotected void validateServiceUrl(String serviceUrl, org.wso2.carbon.automation.engine.context.beans.Tenant tenant)
serviceUrl - URL to be validated.tenant - logged in tenant.protected static String getModelStorageDirectory()
protected void destroy()
throws MLHttpClientException
MLHttpClientExceptionprotected void testExportAsPMML(int modelId)
throws MLHttpClientException,
IOException
MLHttpClientExceptionIOExceptionprotected void testPublishAsPMML(int modelId)
throws MLHttpClientException,
IOException
MLHttpClientExceptionIOExceptionCopyright © 2016 WSO2, Inc.. All rights reserved.