br.eti.kinoshita.testlinkjavaapi
public class TestLinkAPI extends Object
| Constructor and Description |
|---|
TestLinkAPI(URL url,
String devKey)
Constructor with parameters.
|
| Modifier and Type | Method and Description |
|---|---|
String |
about()
Displays information about TL.
|
Map<String,Object> |
addPlatformToTestPlan(Integer testProjectId,
Integer testPlanId,
String platformName)
Adds a platform to a test plan.
|
Integer |
addTestCaseToTestPlan(Integer testProjectId,
Integer testPlanId,
Integer testCaseId,
Integer version,
Integer platformId,
Integer order,
Integer urgency)
Adds a Test Case to a Test Plan.
|
void |
assignRequirements(Integer testCaseId,
Integer testProjectId,
List<Requirement> requirements)
Assign a requirements to a Test Case.
|
Boolean |
checkDevKey(String devKey)
Checks developer key.
|
Build |
createBuild(Integer testPlanId,
String buildName,
String buildNotes)
Creates a Build.
|
TestCase |
createTestCase(String testCaseName,
Integer testSuiteId,
Integer testProjectId,
String authorLogin,
String summary,
List<TestCaseStep> steps,
String preconditions,
TestImportance importance,
ExecutionType execution,
Integer order,
Integer internalId,
Boolean checkDuplicatedName,
ActionOnDuplicate actionOnDuplicatedName)
Creates a Test Case.
|
Map<String,Object> |
createTestCaseSteps(Integer testCaseId,
String testCaseExternalId,
Integer version,
TestCaseStepAction action,
List<TestCaseStep> testCaseSteps)
Create, Update or Push a list of TestCaseSteps in a Test Case.
|
TestPlan |
createTestPlan(String planName,
String projectName,
String notes,
Boolean isActive,
Boolean isPublic)
Creates a Test Plan.
|
TestProject |
createTestProject(String testProjectName,
String testProjectPrefix,
String notes,
Boolean enableRequirements,
Boolean enableTestPriority,
Boolean enableAutomation,
Boolean enableInventory,
Boolean isActive,
Boolean isPublic)
Creates a Test Project.
|
TestSuite |
createTestSuite(Integer testProjectId,
String name,
String details,
Integer parentId,
Integer order,
Boolean checkDuplicatedName,
ActionOnDuplicate actionOnDuplicatedName) |
void |
deleteExecution(Integer executionId)
Deletes an execution.
|
Map<String,Object> |
deleteTestCaseSteps(String testCaseExternalId,
Integer version,
List<TestCaseStep> testCaseSteps)
Delete a list if TestCaseSteps from a Test Case.
|
Boolean |
doesUserExist(String user)
Checks if the given user exists.
|
Object |
executeXmlRpcCall(String methodName,
Map<String,Object> executionData)
Executes a XML-RPC call.
|
Build[] |
getBuildsForTestPlan(Integer testPlanId)
Retrieves an Array of Builds for a given Test Plan.
|
String |
getDevKey() |
Map<String,Object> |
getExecCountersByBuild(Integer testPlanId)
Gets the exec counters by build.
|
TestSuite[] |
getFirstLevelTestSuitesForTestProject(Integer testProjectId)
Get set of test suites AT TOP LEVEL of tree on a Test Project
|
String[] |
getFullPath(Integer nodeId)
Retrieves the full path of a node.
|
Execution |
getLastExecutionResult(Integer testPlanId,
Integer testCaseId,
Integer testCaseExternalId)
Retrieves last execution result of a Test Case.
|
Build |
getLatestBuildForTestPlan(Integer testPlanId)
Retrieves the latest Build for a given Test Plan.
|
Platform[] |
getProjectPlatforms(Integer projectId)
Retrieves the platforms of a test project.
|
TestProject[] |
getProjects()
Retrieves all Test Projects from TestLink.
|
TestPlan[] |
getProjectTestPlans(Integer projectId)
Retrieves an array of Test Plans associated to a Test Project.
|
TestCase |
getTestCase(Integer testCaseId,
Integer testCaseExternalId,
Integer version)
Get a test case
|
Attachment[] |
getTestCaseAttachments(Integer testCaseId,
Integer testCaseExternalId)
Return an array of attachments of a Test Case.
|
TestCase |
getTestCaseByExternalId(String fullTestCaseExternalId,
Integer version)
Get a Test Case using the full external id, composed by the prefix and the external id: prefix-externalId
|
CustomField |
getTestCaseCustomFieldDesignValue(Integer testCaseId,
Integer testCaseExternalId,
Integer versionNumber,
Integer testProjectId,
String customFieldName,
ResponseDetails details)
Retrieves list of Custom Fields for a Test Case.
|
protected CustomField |
getTestCaseCustomFieldExecutionValue(Integer testCaseId,
Integer testCaseExternalId,
Integer versionNumber,
Integer executionId,
Integer testProjectId,
String customFieldName,
ResponseDetails details)
Gets the test case custom field value on test execution scope.
|
protected CustomField |
getTestCaseCustomFieldTestPlanDesignValue(Integer testCaseId,
Integer testCaseExternalId,
Integer versionNumber,
Integer testProjectId,
String customFieldName,
ResponseDetails details)
Gets the test case custom field value on test plan design scope.
|
Integer |
getTestCaseIDByName(String testCaseName,
String testSuiteName,
String testProjectName,
String testCasePathName)
Get a test case ID by a test case Name
|
TestCase[] |
getTestCasesForTestPlan(Integer testPlanId,
List<Integer> testCasesIds,
Integer buildId,
List<Integer> keywordsIds,
String keywords,
Boolean executed,
List<Integer> assignedTo,
String[] executeStatus,
ExecutionType executionType,
Boolean getStepInfo,
TestCaseDetails detail)
Retrieves Test Cases for Test Plans.
|
TestCase[] |
getTestCasesForTestSuite(Integer testSuiteId,
Boolean deep,
TestCaseDetails detail)
Retrieves Test Cases for a Test Suite.
|
TestPlan |
getTestPlanByName(String planName,
String projectName)
Retrieves a Test Plan by its name.
|
Platform[] |
getTestPlanPlatforms(Integer planId)
Retrieves Platforms of a Test Plan.
|
TestProject |
getTestProjectByName(String projectName)
Retrieves a Test Project by its name.
|
TestSuite[] |
getTestSuiteByID(List<Integer> testSuiteIds)
Retrieves Test Suites for given Ids.
|
TestSuite[] |
getTestSuitesForTestPlan(Integer testPlanId) |
TestSuite[] |
getTestSuitesForTestSuite(Integer testSuiteId)
Get list of TestSuites which are DIRECT children of a given TestSuite
|
Map<String,Object> |
getTotalsForTestPlan(Integer testPlanId)
Gets stats for test plan.
|
URL |
getUrl() |
User |
getUserByLogin(String login)
Get user by login.
|
org.apache.xmlrpc.client.XmlRpcClient |
getXmlRpcClient() |
String |
ping()
ping method is an alias for sayHello.
|
Map<String,Object> |
removePlatformFromTestPlan(Integer testProjectId,
Integer testPlanId,
String platformName)
Removes a platform from a test plan.
|
String |
repeat(String str) |
ReportTCResultResponse |
reportTCResult(Integer testCaseId,
Integer testCaseExternalId,
Integer testPlanId,
ExecutionStatus status,
Integer buildId,
String buildName,
String notes,
Boolean guess,
String bugId,
Integer platformId,
String platformName,
Map<String,String> customFields,
Boolean overwrite)
Reports a Test Case result.
|
String |
sayHello()
Says hello to the user.
|
ReportTCResultResponse |
setTestCaseExecutionResult(Integer testCaseId,
Integer testCaseExternalId,
Integer testPlanId,
ExecutionStatus status,
Integer buildId,
String buildName,
String notes,
Boolean guess,
String bugId,
Integer platformId,
String platformName,
Map<String,String> customFields,
Boolean overwrite)
Reports a Test Case result.
|
Map<String,Object> |
setTestCaseExecutionType(Integer testProjectId,
Integer testCaseId,
Integer testCaseExternalId,
Integer versionNumber,
ExecutionType executionType)
Sets the test case execution type.
|
Boolean |
setTestMode(Boolean testMode) |
String |
toString() |
Attachment |
uploadAttachment(Integer fkId,
String fkTable,
String title,
String description,
String fileName,
String fileType,
String content)
Uploads an attachment linking it to a DB table.
|
Attachment |
uploadExecutionAttachment(Integer executionId,
String title,
String description,
String fileName,
String fileType,
String content) |
Attachment |
uploadRequirementAttachment(Integer requirementId,
String title,
String description,
String fileName,
String fileType,
String content)
Uploads an attachment to a Requirement.
|
Attachment |
uploadRequirementSpecificationAttachment(Integer reqSpecId,
String title,
String description,
String fileName,
String fileType,
String content)
Uploads an attachment to a Requirement Specification.
|
Attachment |
uploadTestCaseAttachment(Integer testCaseId,
String title,
String description,
String fileName,
String fileType,
String content)
Uploads an attachment to a Test Case.
|
Attachment |
uploadTestProjectAttachment(Integer testProjectId,
String title,
String description,
String fileName,
String fileType,
String content)
Uploads an attachment to a Test Project.
|
Attachment |
uploadTestSuiteAttachment(Integer testSuiteId,
String title,
String description,
String fileName,
String fileType,
String content)
Uploads an attachment to a Test Suite.
|
public TestLinkAPI(URL url, String devKey) throws TestLinkAPIException
Instantiates TestLink services. It also checks the devKey and throws a TestLinkAPIException if it is invalid.
url - The URL to set.devKey - The Developer Key to set.TestLinkAPIExceptionpublic org.apache.xmlrpc.client.XmlRpcClient getXmlRpcClient()
public URL getUrl()
public String getDevKey()
public Boolean checkDevKey(String devKey) throws TestLinkAPIException
devKey - Developer Key.true if devKey is valid, false otherwise.TestLinkAPIExceptionpublic Boolean doesUserExist(String user) throws TestLinkAPIException
user - true if the user exists, false otherwise.TestLinkAPIExceptionpublic User getUserByLogin(String login) throws TestLinkAPIException
login - TestLinkAPIExceptionpublic String ping() throws TestLinkAPIException
TestLinkAPIExceptionpublic String sayHello() throws TestLinkAPIException
TestLinkAPIExceptionpublic String about() throws TestLinkAPIException
TestLinkAPIExceptionpublic Boolean setTestMode(Boolean testMode) throws TestLinkAPIException
testMode - TestLinkAPIExceptionpublic String repeat(String str) throws TestLinkAPIException
str - TestLinkAPIExceptionpublic Attachment uploadAttachment(Integer fkId, String fkTable, String title, String description, String fileName, String fileType, String content) throws TestLinkAPIException
fkId - fkTable - title - description - fileName - fileType - content - TestLinkAPIExceptionpublic String[] getFullPath(Integer nodeId) throws TestLinkAPIException
nodeId - TestLinkAPIExceptionpublic Execution getLastExecutionResult(Integer testPlanId, Integer testCaseId, Integer testCaseExternalId) throws TestLinkAPIException
testPlanId - testCaseId - testCaseExternalId - TestLinkAPIExceptionpublic TestProject createTestProject(String testProjectName, String testProjectPrefix, String notes, Boolean enableRequirements, Boolean enableTestPriority, Boolean enableAutomation, Boolean enableInventory, Boolean isActive, Boolean isPublic) throws TestLinkAPIException
testProjectName - testProjectPrefix - notes - enableRequirements - enableTestPriority - enableAutomation - enableInventory - isActive - isPublic - TestLinkAPIExceptionpublic TestProject getTestProjectByName(String projectName) throws TestLinkAPIException
projectName - Test Project name.TestLinkAPIExceptionpublic Platform[] getProjectPlatforms(Integer projectId) throws TestLinkAPIException
projectId - test project IDTestLinkAPIException - if an error occurs when retrieving the platformspublic TestProject[] getProjects() throws TestLinkAPIException
TestLinkAPIExceptionpublic TestPlan[] getProjectTestPlans(Integer projectId) throws TestLinkAPIException
projectId - Test Project Id.TestLinkAPIExceptionpublic Attachment uploadTestProjectAttachment(Integer testProjectId, String title, String description, String fileName, String fileType, String content) throws TestLinkAPIException
testProjectId - title - description - fileName - fileType - content - TestLinkAPIExceptionpublic TestPlan createTestPlan(String planName, String projectName, String notes, Boolean isActive, Boolean isPublic) throws TestLinkAPIException
planName - Test Plan name.projectName - Test Project name.notes - Test Plan notes.isActive - isPublic - TestLinkAPIExceptionpublic TestPlan getTestPlanByName(String planName, String projectName) throws TestLinkAPIException
planName - Test Plan name.projectName - Test Project name.TestLinkAPIExceptionpublic Platform[] getTestPlanPlatforms(Integer planId) throws TestLinkAPIException
planId - Test Plan Id.TestLinkAPIExceptionpublic Map<String,Object> getTotalsForTestPlan(Integer testPlanId) throws TestLinkAPIException
testPlanId - test plan IDTestLinkAPIExceptionpublic Map<String,Object> removePlatformFromTestPlan(Integer testProjectId, Integer testPlanId, String platformName) throws TestLinkAPIException
testProjectId - test project IDtestPlanId - test plan IDplatformName - platform nameTestLinkAPIExceptionpublic Map<String,Object> addPlatformToTestPlan(Integer testProjectId, Integer testPlanId, String platformName) throws TestLinkAPIException
testProjectId - test project IDtestPlanId - test plan IDplatformName - platform nameTestLinkAPIExceptionpublic Build createBuild(Integer testPlanId, String buildName, String buildNotes) throws TestLinkAPIException
testPlanId - buildName - buildNotes - TestLinkAPIExceptionpublic Build[] getBuildsForTestPlan(Integer testPlanId) throws TestLinkAPIException
testPlanId - Test Plan ID.TestLinkAPIExceptionpublic Build getLatestBuildForTestPlan(Integer testPlanId) throws TestLinkAPIException
testPlanId - Test Plan ID.TestLinkAPIExceptionpublic Map<String,Object> getExecCountersByBuild(Integer testPlanId)
testPlanId - public TestSuite createTestSuite(Integer testProjectId, String name, String details, Integer parentId, Integer order, Boolean checkDuplicatedName, ActionOnDuplicate actionOnDuplicatedName) throws TestLinkAPIException
TestLinkAPIExceptionpublic TestSuite[] getTestSuiteByID(List<Integer> testSuiteIds) throws TestLinkAPIException
testSuiteIds - List of Test Suite Ids.TestLinkAPIExceptionpublic Attachment uploadTestSuiteAttachment(Integer testSuiteId, String title, String description, String fileName, String fileType, String content) throws TestLinkAPIException
testSuiteId - title - description - fileName - fileType - content - TestLinkAPIExceptionpublic TestSuite[] getTestSuitesForTestPlan(Integer testPlanId) throws TestLinkAPIException
testPlanId - TestLinkAPIExceptionpublic TestSuite[] getTestSuitesForTestSuite(Integer testSuiteId) throws TestLinkAPIException
testSuiteId - TestLinkAPIExceptionpublic TestSuite[] getFirstLevelTestSuitesForTestProject(Integer testProjectId) throws TestLinkAPIException
testProjectId - TestLinkAPIExceptionpublic TestCase createTestCase(String testCaseName, Integer testSuiteId, Integer testProjectId, String authorLogin, String summary, List<TestCaseStep> steps, String preconditions, TestImportance importance, ExecutionType execution, Integer order, Integer internalId, Boolean checkDuplicatedName, ActionOnDuplicate actionOnDuplicatedName) throws TestLinkAPIException
testCaseName - testSuiteId - testProjectId - authorLogin - summary - steps - preconditions - importance - execution - order - internalId - checkDuplicatedName - actionOnDuplicatedName - TestLinkAPIExceptionpublic Map<String,Object> createTestCaseSteps(Integer testCaseId, String testCaseExternalId, Integer version, TestCaseStepAction action, List<TestCaseStep> testCaseSteps) throws TestLinkAPIException
testCaseExternalId - version - testCaseSteps - TestLinkAPIExceptionpublic Map<String,Object> deleteTestCaseSteps(String testCaseExternalId, Integer version, List<TestCaseStep> testCaseSteps) throws TestLinkAPIException
testCaseExternalId - version - testCaseSteps - TestLinkAPIExceptionpublic Integer addTestCaseToTestPlan(Integer testProjectId, Integer testPlanId, Integer testCaseId, Integer version, Integer platformId, Integer order, Integer urgency) throws TestLinkAPIException
testProjectId - testPlanId - testCaseId - version - platformId - order - urgency - TestLinkAPIExceptionpublic TestCase[] getTestCasesForTestSuite(Integer testSuiteId, Boolean deep, TestCaseDetails detail) throws TestLinkAPIException
testSuiteId - deep - detail - TestLinkAPIExceptionpublic TestCase getTestCase(Integer testCaseId, Integer testCaseExternalId, Integer version) throws TestLinkAPIException
testCaseId - testCaseExternalId - version - TestLinkAPIExceptionpublic TestCase getTestCaseByExternalId(String fullTestCaseExternalId, Integer version) throws TestLinkAPIException
fullTestCaseExternalId - Full external id: prefix-externalIdversion - TestLinkAPIExceptionpublic TestCase[] getTestCasesForTestPlan(Integer testPlanId, List<Integer> testCasesIds, Integer buildId, List<Integer> keywordsIds, String keywords, Boolean executed, List<Integer> assignedTo, String[] executeStatus, ExecutionType executionType, Boolean getStepInfo, TestCaseDetails detail) throws TestLinkAPIException
testPlanId - testCasesIds - buildId - keywordsIds - keywords - executed - assignedTo - executeStatus - executionType - getStepInfo - TestLinkAPIExceptionpublic Integer getTestCaseIDByName(String testCaseName, String testSuiteName, String testProjectName, String testCasePathName) throws TestLinkAPIException
testCaseName - testSuiteName - testProjectName - testCasePathName - TestLinkAPIExceptionpublic Attachment uploadTestCaseAttachment(Integer testCaseId, String title, String description, String fileName, String fileType, String content) throws TestLinkAPIException
testCaseId - title - description - fileName - fileType - content - TestLinkAPIExceptionpublic Attachment[] getTestCaseAttachments(Integer testCaseId, Integer testCaseExternalId) throws TestLinkAPIException
testCaseId - testCaseExternalId - TestLinkAPIExceptionpublic Attachment uploadExecutionAttachment(Integer executionId, String title, String description, String fileName, String fileType, String content) throws TestLinkAPIException
TestLinkAPIExceptionpublic void deleteExecution(Integer executionId) throws TestLinkAPIException
executionId - Execution Id.TestLinkAPIExceptionpublic ReportTCResultResponse reportTCResult(Integer testCaseId, Integer testCaseExternalId, Integer testPlanId, ExecutionStatus status, Integer buildId, String buildName, String notes, Boolean guess, String bugId, Integer platformId, String platformName, Map<String,String> customFields, Boolean overwrite) throws TestLinkAPIException
testCaseId - testCaseExternalId - testPlanId - status - buildId - buildName - notes - guess - bugId - platformId - platformName - customFields - overwrite - TestLinkAPIExceptionpublic ReportTCResultResponse setTestCaseExecutionResult(Integer testCaseId, Integer testCaseExternalId, Integer testPlanId, ExecutionStatus status, Integer buildId, String buildName, String notes, Boolean guess, String bugId, Integer platformId, String platformName, Map<String,String> customFields, Boolean overwrite) throws TestLinkAPIException
testCaseId - testCaseExternalId - testPlanId - status - buildId - buildName - notes - guess - bugId - platformId - platformName - customFields - overwrite - TestLinkAPIExceptionpublic CustomField getTestCaseCustomFieldDesignValue(Integer testCaseId, Integer testCaseExternalId, Integer versionNumber, Integer testProjectId, String customFieldName, ResponseDetails details) throws TestLinkAPIException
testCaseId - testCaseExternalId - versionNumber - testProjectId - customFieldName - TestLinkAPIExceptionprotected CustomField getTestCaseCustomFieldTestPlanDesignValue(Integer testCaseId, Integer testCaseExternalId, Integer versionNumber, Integer testProjectId, String customFieldName, ResponseDetails details) throws TestLinkAPIException
testCaseId - testCaseExternalId - versionNumber - testProjectId - customFieldName - details - TestLinkAPIExceptionprotected CustomField getTestCaseCustomFieldExecutionValue(Integer testCaseId, Integer testCaseExternalId, Integer versionNumber, Integer executionId, Integer testProjectId, String customFieldName, ResponseDetails details) throws TestLinkAPIException
testCaseId - testCaseExternalId - versionNumber - executionId - testProjectId - customFieldName - details - TestLinkAPIExceptionpublic Map<String,Object> setTestCaseExecutionType(Integer testProjectId, Integer testCaseId, Integer testCaseExternalId, Integer versionNumber, ExecutionType executionType)
testProjectId - testCaseExternalId - versionNumber - executionType - public Attachment uploadRequirementSpecificationAttachment(Integer reqSpecId, String title, String description, String fileName, String fileType, String content) throws TestLinkAPIException
reqSpecId - title - description - fileName - fileType - content - TestLinkAPIExceptionpublic Attachment uploadRequirementAttachment(Integer requirementId, String title, String description, String fileName, String fileType, String content) throws TestLinkAPIException
requirementId - title - description - fileName - fileType - content - TestLinkAPIExceptionpublic void assignRequirements(Integer testCaseId, Integer testProjectId, List<Requirement> requirements) throws TestLinkAPIException
testCaseId - testProjectId - requirements - TestLinkAPIExceptionpublic Object executeXmlRpcCall(String methodName, Map<String,Object> executionData) throws org.apache.xmlrpc.XmlRpcException, TestLinkAPIException
methodName - Name of the method.executionData - Execution data map.org.apache.xmlrpc.XmlRpcExceptionTestLinkAPIExceptionCopyright © 2010-2011 the testlink-java-api team-2013. All Rights Reserved.