├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── new-method.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE.txt ├── README.md ├── checkstyle-suppressions.xml ├── checkstyle.xml ├── docker-compose.yml ├── pom.xml └── src ├── changes └── changes.xml ├── documents ├── RELEASE_SITE ├── TestApi.java ├── config.inc.php ├── http-basic-auth │ ├── README.txt │ └── sample.htaccess ├── mysql_backup ├── php xml-rpc api │ └── methods-1.9-RC1 └── sql │ ├── testlink_190.sql │ ├── testlink_191.sql │ ├── testlink_192.sql │ └── testlink_dummy.sql ├── main └── java │ └── br │ └── eti │ └── kinoshita │ └── testlinkjavaapi │ ├── BaseService.java │ ├── BuildService.java │ ├── MiscService.java │ ├── ReqSpecService.java │ ├── RequirementService.java │ ├── TestCaseService.java │ ├── TestLinkAPI.java │ ├── TestPlanService.java │ ├── TestProjectService.java │ ├── TestSuiteService.java │ ├── constants │ ├── ActionOnDuplicate.java │ ├── ExecutionStatus.java │ ├── ExecutionType.java │ ├── ResponseDetails.java │ ├── TestCaseDetails.java │ ├── TestCaseStatus.java │ ├── TestCaseStepAction.java │ ├── TestImportance.java │ ├── TestLinkAPIErrors.java │ ├── TestLinkMethods.java │ ├── TestLinkParams.java │ ├── TestLinkResponseParams.java │ ├── TestLinkTables.java │ └── TestLinkUser.java │ ├── model │ ├── Attachment.java │ ├── Build.java │ ├── CustomField.java │ ├── Execution.java │ ├── Platform.java │ ├── ReportTCResultResponse.java │ ├── Requirement.java │ ├── Role.java │ ├── TestCase.java │ ├── TestCaseStep.java │ ├── TestCaseStepResult.java │ ├── TestPlan.java │ ├── TestProject.java │ ├── TestSuite.java │ └── User.java │ └── util │ ├── TestLinkAPIException.java │ └── Util.java ├── site ├── apt │ ├── downloads.apt │ ├── exceptions.apt │ ├── extending.apt │ ├── implemented_methods.apt │ ├── index.apt │ ├── related_projects.apt │ ├── release_notes.apt │ ├── roadmap.apt │ ├── sample1.apt │ ├── sample2.apt │ ├── sample3.apt │ ├── sample4.apt │ └── structure.apt ├── resources │ └── images │ │ ├── stan4j-88x31-o1.png │ │ ├── structure.png │ │ ├── testlinkjavaapi-logo-white.png │ │ └── testlinkjavaapi-logo-white.xcf └── site.xml └── test ├── java └── br │ └── eti │ └── kinoshita │ └── testlinkjavaapi │ ├── BaseTest.java │ ├── HttpTestServer.java │ ├── build │ ├── TestCreateBuild.java │ ├── TestGetBuildsForTestPlan.java │ ├── TestGetExecCountersByBuild.java │ ├── TestGetLatestBuildForTestPlan.java │ └── TestUpdateBuildCustomFields.java │ ├── other │ ├── TestIndependentTests.java │ └── issue3216884 │ │ └── TestDevKeyIssue3216884.java │ ├── requirement │ └── TestAssignRequirement.java │ ├── testcase │ ├── TestAddTestCaseKeyWords.java │ ├── TestAddTestCaseToTestPlan.java │ ├── TestCreateTestCase.java │ ├── TestDeleteExecution.java │ ├── TestGetFullPath.java │ ├── TestGetLastExecutionResult.java │ ├── TestGetTestCase.java │ ├── TestGetTestCaseAttachments.java │ ├── TestGetTestCaseBugs.java │ ├── TestGetTestCaseCustomFieldExecutionValue.java │ ├── TestGetTestCaseCustomFieldValue.java │ ├── TestGetTestCaseIDByName.java │ ├── TestGetTestCaseKeywords.java │ ├── TestGetTestCasesForTestPlan.java │ ├── TestGetTestCasesForTestPlanEmptyResult.java │ ├── TestGetTestCasesForTestSuite.java │ ├── TestGetTestCasesForTestSuiteEmptyResult.java │ ├── TestReportTCResult.java │ ├── TestReportTCStepResults.java │ ├── TestSetTestCaseExecutionType.java │ └── issue3224421 │ │ └── TestIssue3224421.java │ ├── testcasesteps │ ├── TestAddTestCaseSteps.java │ └── TestDeleteTestCaseSteps.java │ ├── testplan │ ├── TestAddPlatformToTestPlan.java │ ├── TestCreateTestPlan.java │ ├── TestGetProjectTestPlans.java │ ├── TestGetTestPlanByName.java │ ├── TestGetTestPlanPlatforms.java │ ├── TestGetTotalsForTestPlan.java │ └── TestRemovePlatformFromTestPlan.java │ ├── testproject │ ├── TestCreateTestProject.java │ ├── TestGetProjectPlatforms.java │ ├── TestGetTestProjectByName.java │ └── TestGetTestProjects.java │ ├── testsuite │ ├── TestCreateTestSuite.java │ ├── TestGetFirstLevelTestSuiteForTestProject.java │ ├── TestGetFirstLevelTestSuiteForTestProjectEmptyResult.java │ ├── TestGetTestSuiteById.java │ ├── TestGetTestSuitesForTestPlan.java │ ├── TestGetTestSuitesForTestSuite.java │ └── TestGetTestSuitesForTestSuiteEmptyResult.java │ ├── upload │ ├── TestUploadAttachment.java │ ├── TestUploadExecutionAttachment.java │ ├── TestUploadRequirementAttachment.java │ ├── TestUploadRequirementSpecificationAttachment.java │ ├── TestUploadTestCaseAttachment.java │ ├── TestUploadTestProjectAttachment.java │ └── TestUploadTestSuiteAttachment.java │ └── user │ └── TestGetUserByLogin.java └── resources ├── br └── eti │ └── kinoshita │ └── testlinkjavaapi │ └── testdata │ ├── tl.about.xml │ ├── tl.addPlatformToTestPlan.xml │ ├── tl.addTestCaseKeyWords.xml │ ├── tl.addTestCaseToTestPlan.xml │ ├── tl.assignRequirements.xml │ ├── tl.checkDevKey.xml │ ├── tl.checkDevKey_invalid.xml │ ├── tl.createBuild.xml │ ├── tl.createTestCase.xml │ ├── tl.createTestCaseSteps.xml │ ├── tl.createTestPlan.xml │ ├── tl.createTestProject.xml │ ├── tl.createTestSuite.xml │ ├── tl.deleteExecution.xml │ ├── tl.deleteTestCaseSteps.xml │ ├── tl.doesUserExist.xml │ ├── tl.getBuildsForTestPlan.xml │ ├── tl.getExecCountersByBuild.xml │ ├── tl.getFirstLevelTestSuitesForTestProject.xml │ ├── tl.getFirstLevelTestSuitesForTestProjectEmptyResult.xml │ ├── tl.getFullPath.xml │ ├── tl.getLastExecutionResult.xml │ ├── tl.getLatestBuildForTestPlan.xml │ ├── tl.getProjectPlatforms.xml │ ├── tl.getProjectTestPlans.xml │ ├── tl.getProjects.xml │ ├── tl.getTestCase.xml │ ├── tl.getTestCaseAttachments.xml │ ├── tl.getTestCaseBugs.xml │ ├── tl.getTestCaseCustomFieldDesignValue.xml │ ├── tl.getTestCaseCustomFieldExecutionValue.xml │ ├── tl.getTestCaseCustomFieldTestPlanDesignValue.xml │ ├── tl.getTestCaseIDByName.xml │ ├── tl.getTestCaseKeywords.xml │ ├── tl.getTestCasesForTestPlan.xml │ ├── tl.getTestCasesForTestPlanEmptyResult.xml │ ├── tl.getTestCasesForTestPlanWithExecutionStatus.xml │ ├── tl.getTestCasesForTestSuite.xml │ ├── tl.getTestCasesForTestSuiteEmptyResult.xml │ ├── tl.getTestPlanByName.xml │ ├── tl.getTestPlanPlatforms.xml │ ├── tl.getTestProjectByName.xml │ ├── tl.getTestProjectByName_nonexistent.xml │ ├── tl.getTestSuiteByID.xml │ ├── tl.getTestSuitesForTestPlan.xml │ ├── tl.getTestSuitesForTestSuite.xml │ ├── tl.getTestSuitesForTestSuiteEmptyResult.xml │ ├── tl.getTotalsForTestPlan.xml │ ├── tl.getUserByLogin.xml │ ├── tl.ping.xml │ ├── tl.removePlatformFromTestPlan.xml │ ├── tl.repeat.xml │ ├── tl.reportTCResult.xml │ ├── tl.sayHello.xml │ ├── tl.setTestCaseExecutionResult.xml │ ├── tl.setTestCaseExecutionType.xml │ ├── tl.setTestMode.xml │ ├── tl.updateBuildCustomFields.xml │ ├── tl.uploadAttachment.xml │ ├── tl.uploadExecutionAttachment.xml │ ├── tl.uploadRequirementAttachment.xml │ ├── tl.uploadRequirementSpecificationAttachment.xml │ ├── tl.uploadTestCaseAttachment.xml │ ├── tl.uploadTestProjectAttachment.xml │ └── tl.uploadTestSuiteAttachment.xml └── testlinkjavaapi.properties /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Include as much information as possible, and make sure you have searched the 4 | previous issues for similar problems 5 | title: '' 6 | labels: bug 7 | assignees: '' 8 | 9 | --- 10 | 11 | **Describe the bug** 12 | A clear and concise description of what the bug is. **Check what is the current version of the API. The older version is not maintained (except via patronage/sponsoring).** 13 | 14 | **To Reproduce** 15 | Steps to reproduce the behavior: 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | **Expected behavior** 22 | A clear and concise description of what you expected to happen. 23 | 24 | **Screenshots** 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Versions:** 28 | - TestLink: [e.g. 1.9.19] 29 | - testlink-java-api: [e.g. 1.9.19-0] 30 | - JVM [e.g. 1.8] 31 | 32 | **Additional context** 33 | Add any other context about the problem here. 34 | 35 | **If you have a problem such as "Failed to parse server's response: Expected methodResponse element, got br ", make sure to check the server response, as TestLink may hide exceptions.** 36 | 37 | The following command starts a port forwarder that can be used to inspect responses: `socat -v tcp-l:9999,fork,reuseaddr tcp:127.0.0.1:8000`. Then just use the same URL with port `9999`. The output will be recorded in the terminal. 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-method.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New method 3 | about: A method from the PHP API is missing 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Have you checked in the PHP project that this method already exists? This project is a thin layer to interact with the PHP API, we try to avoid adding extra behavior to facilitate maintenance.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Pull requests welcome!**. Remember this is an Open Source project. If you have a project at your company, or an issue that you need desperately, consider patronage/sponsoring, as otherwise it is maintained in volunteer time. 17 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Pull request for issue #xxxx 2 | 3 | - [ ] unit tests included 4 | - [ ] entry to changes.xml 5 | - [ ] removed any @author tag 6 | - [ ] avoided adding multiple commits for formatting/etc. The less commits the better, when possible 7 | - [ ] modified only the necessary for the change, avoiding changing formatting, removing empty lines, etc 8 | - [ ] the code refers to a bug reported, or to enhancements to support the PHP code (no extra code is added in the Java API for simplicity) 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /target/ 3 | /.settings/ 4 | /.classpath 5 | /.project 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | sudo: false 3 | dist: trusty 4 | 5 | jdk: 6 | - oraclejdk8 7 | - oraclejdk9 8 | - oraclejdk11 9 | 10 | matrix: 11 | fast_finish: true 12 | allow_failures: 13 | - jdk: oraclejdk11 14 | 15 | script: 16 | - mvn 17 | 18 | cache: 19 | directories: 20 | - $HOME/.m2 21 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Thank you for taking your time to contribute back to this Open Source project. 2 | 3 | ## Code style 4 | 5 | When submitting pull requests and patches, make sure to turn auto formatting and 6 | style off in your IDE. 7 | 8 | If your pull request includes changes such as Javadoc changes, tab to space conversion 9 | and similar changes, it makes it much harder to merge your code. Not only due to 10 | different formatting, but there may be other developers working on the code, or other 11 | pending pull requests that may conflict with your changes. 12 | 13 | When submitting pull requests, remember that the smaller your change, the simpler 14 | (and faster) it is to get it merged. And you can submit other changes just for code 15 | style and formatting. 16 | 17 | ## Licensing 18 | 19 | Your should be able to license your code under the MIT License, or compatible 20 | license. 21 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.3.4-apache 2 | 3 | RUN apt-get update && apt-get install -y --no-install-recommends \ 4 | locales \ 5 | zlib1g-dev \ 6 | libpng-dev \ 7 | libzip-dev \ 8 | wget \ 9 | unzip \ 10 | && rm -rf /var/lib/apt/lists/* 11 | 12 | RUN docker-php-ext-install mysqli \ 13 | && docker-php-ext-install mbstring \ 14 | && docker-php-ext-install zip \ 15 | && docker-php-ext-install json \ 16 | && docker-php-ext-install gd \ 17 | && docker-php-ext-install gettext 18 | 19 | RUN a2enmod rewrite 20 | 21 | RUN echo $'en_US.UTF-8 UTF-8\n\ 22 | fr_FR.UTF-8 UTF-8\n\ 23 | en_GB.UTF-8 UTF-8\n\ 24 | fi_FI.UTF-8 UTF-8\n\ 25 | sv_SE.UTF-8 UTF-8\n'\ 26 | >> /etc/locale.gen 27 | 28 | RUN locale-gen 29 | 30 | RUN echo "session.gc_maxlifetime=60000" >> /usr/local/etc/php/php.ini \ 31 | && echo "max_execution_time=3000" >> /usr/local/etc/php/php.ini 32 | 33 | RUN wget https://github.com/TestLinkOpenSourceTRMS/testlink-code/archive/1.9.19.zip -O /var/www/html/source.zip \ 34 | && unzip /var/www/html/source.zip -d /tmp/ \ 35 | && mv /tmp/testlink*/* /var/www/html/ 36 | 37 | RUN mkdir -p /var/www/html/gui/templates_c \ 38 | && mkdir -p /var/testlink/logs/ \ 39 | && mkdir -p /var/testlink/upload_area/ \ 40 | && chown -R www-data: /var/www/html/gui/templates_c \ 41 | && chown -R www-data: /var/testlink/ 42 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | TestLink Java API 2 | ================= 3 | 4 | [![Build Status](https://travis-ci.org/kinow/testlink-java-api.svg?branch=master)](https://travis-ci.org/kinow/testlink-java-api) 5 | [![Coverage Status](https://coveralls.io/repos/kinow/testlink-java-api/badge.svg?branch=master)](https://coveralls.io/r/kinow/testlink-java-api) 6 | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/br.eti.kinoshita/testlink-java-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/br.eti.kinoshita/testlink-java-api/) 7 | [![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT) 8 | 9 | [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/X8X1618T2) 10 | 11 | Project homepage: http://kinow.github.io/testlink-java-api 12 | 13 | TestLink Java API is a Java API that interfaces TestLink XML-RPC API. This API lets you call TestLink internal 14 | methods such as createTestProject, uploadAttachment, getTestProjectByName among others. 15 | 16 | ## Building 17 | 18 | The project is built with Maven: 19 | 20 | mvn 21 | 22 | You can also use the Docker files included in this project repository to set up an environment 23 | with the PHP TestLink project. Simply run: 24 | 25 | docker-compose up 26 | 27 | That should create two containers (`web` and `db`). The MySQL database will be available on 28 | `localhost:3306`, and the web application on `http://localhost:8000`. 29 | 30 | ## Versioning 31 | 32 | The API version matches the version of TestLink it was developed for. So for TestLink 1.9.15, you should use 33 | testlink-java-api-1.9.15-x. Where x is an internal sequential number, used to distinguish between project releases. 34 | 35 | If you use the API version 1.9.15-0 against TestLink 1.9.16, there is no guarantee it will work. 36 | 37 | ## Support 38 | 39 | This is an Open Source project. Pull requests are welcome! When reporting issues, please include as much 40 | information as possible. 41 | 42 | If you have an issue that you need for your organisation and you need it urgentely, please consider contacting the 43 | author about sponsored work, or work with companies that contribute to Open Source software. Remember, this is an 44 | Open Source project, maintained by volunteers on their spare time. 45 | -------------------------------------------------------------------------------- /checkstyle-suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | -------------------------------------------------------------------------------- /checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | db: 5 | container_name: testlink-db 6 | image: mysql:5.7 7 | environment: 8 | MYSQL_ROOT_PASSWORD: testlink 9 | MYSQL_DATABASE: testlink 10 | MYSQL_USER: testlink 11 | MYSQL_PASSWORD: testlink 12 | ports: 13 | - "9906:3306" 14 | volumes: 15 | - ~/Development/docker/volumes/mysql-testlink:/var/lib/mysql 16 | web: 17 | container_name: testlink 18 | build: . 19 | ports: 20 | - 8000:80 21 | depends_on: 22 | - db 23 | -------------------------------------------------------------------------------- /src/documents/RELEASE_SITE: -------------------------------------------------------------------------------- 1 | In the beginning we were using FTP to update the site. 2 | 3 | Now we are using a maven plug-in that compresses the site folder, uploads it 4 | to the web server and updates the site much faster. 5 | 6 | Create a shell on shell.sourceforge.net with your username and project group 7 | 8 | ssh -t ,@shell.sf.net create 9 | 10 | Use shell.sourceforge.net (instead of web.sourceforge.net) in you site URL 11 | 12 | ... 13 | 14 | ... 15 | 16 | your_project.sf.net 17 | scp://shell.sourceforge.net/home/groups/y/yo/your_project/htdocs 18 | 19 | 20 | 21 | Run mvn site:deploy 22 | Verify that you have a working web site by opening a browser to http://your_project.sf.net 23 | -------------------------------------------------------------------------------- /src/documents/http-basic-auth/README.txt: -------------------------------------------------------------------------------- 1 | On April the 20th Ryo Hang reported in Jenkins' JIRA an issue [1] regarding 2 | problems using Jenkins TestLink Plug-in and TestLink with HTTP Basic auth 3 | enabled. 4 | 5 | After some analysis, and debugging, Ryo found out that the issue was actually 6 | here in TestLink Java API. Ryo joined the team and his first contribution 7 | was branch REL-1.9.1-httpauthentication [2]. 8 | 9 | And it's not all, Ryo wrote test cases for this issue (TDD). :) 10 | 11 | See ${basedir}/src/documents/http-basic-auth/sample.htaccess. 12 | 13 | To create a passwd file, go to Apache installation folder and look for htpasswd 14 | executable. Then try executing it passing -b -c /tmp/passwd as arguments. 15 | 16 | [1] https://issues.jenkins-ci.org/browse/JENKINS-9465 17 | 18 | [2] https://testlinkjavaapi.svn.sourceforge.net/svnroot/testlinkjavaapi/branches/REL-1.9.1-httpauthentication 19 | 20 | [3] http://httpd.apache.org/docs/1.3/howto/auth.html#basic 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/documents/http-basic-auth/sample.htaccess: -------------------------------------------------------------------------------- 1 | AuthType Basic 2 | AuthName "By Invitation Only" 3 | AuthUserFile c:/tmp/passwd 4 | Require user testlink -------------------------------------------------------------------------------- /src/documents/mysql_backup: -------------------------------------------------------------------------------- 1 | mysqldump --add-drop-table -u root testlink_191 > testlink_191.sql 2 | mysql -u root testlink_190 < testlink_190.sql -------------------------------------------------------------------------------- /src/documents/php xml-rpc api/methods-1.9-RC1: -------------------------------------------------------------------------------- 1 | reportTCResult - OK 20101102 2 | setTestCaseExecutionResult - OK 20101102 3 | createBuild - OK 20101030 4 | createTestCase - OK 20101028 5 | createTestPlan - OK 20101027 6 | createTestProject - OK 20101026 7 | createTestSuite - OK 20101029 8 | uploadRequirementSpecificationAttachment - OK 20101101 9 | uploadRequirementAttachment - OK 20101101 10 | uploadTestProjectAttachment - OK 20101101 11 | uploadTestSuiteAttachment - OK 20101101 12 | uploadTestCaseAttachment - OK 20101101 13 | uploadAttachment - OK 20101101 14 | assignRequirements - OK 20101101 15 | addTestCaseToTestPlan - OK 20101029 16 | getProjects - OK 20101026 17 | getTestProjectByName - OK 20101026 18 | getTestPlanByName - OK 20101027 19 | getProjectTestPlans - OK 20101027 20 | getTestPlanPlatforms - OK 20101027 21 | getTotalsForTestPlan - OK 20101103 22 | getBuildsForTestPlan - OK 20101103 23 | getLatestBuildForTestPlan - OK 20101103 24 | getLastExecutionResult - OK 20101102 25 | getTestSuitesForTestPlan - OK 20101102 26 | getTestSuitesForTestSuite - OK 20101102 27 | getTestCasesForTestSuite - OK 20101030 28 | getTestCasesForTestPlan - OK 20101031 29 | getTestCaseIDByName - OK 20101101 30 | getTestCaseCustomFieldDesignValue - OK 20101103 31 | getFirstLevelTestSuitesForTestProject - OK 20101102 32 | getTestCaseAttachments - OK 20101101 33 | getTestCase - OK 20101031 34 | getFullPath - OK 20101101 35 | getTestSuiteByID - OK 20101030 36 | deleteExecution - OK 20101101 37 | doesUserExist - OK 20101029 38 | checkDevKey - OK 20101026 39 | about - OK 20101029 40 | setTestMode - OK 20101030 41 | ping - OK 20101029 42 | sayHello - OK 20101029 43 | repeat - OK 20101030 -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/ActionOnDuplicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * 28 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 29 | * @since 0.1 30 | */ 31 | public enum ActionOnDuplicate { 32 | 33 | BLOCK("block"), GENERATE_NEW("generate_new"), CREATE_NEW_VERSION("create_new_version"); 34 | 35 | private final String value; 36 | 37 | ActionOnDuplicate(String value) { 38 | this.value = value; 39 | } 40 | 41 | /** 42 | * Return the action value. 43 | * @return action value 44 | */ 45 | public String getValue() { 46 | return this.value; 47 | } 48 | 49 | /* 50 | * (non-Javadoc) 51 | * 52 | * @see java.lang.Enum#toString() 53 | */ 54 | @Override 55 | public String toString() { 56 | return getValue(); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/ExecutionStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 28 | * @since 1.9.0-1 29 | */ 30 | public enum ExecutionStatus { 31 | 32 | NOT_RUN('n'), PASSED('p'), FAILED('f'), BLOCKED('b'); 33 | 34 | private final char value; 35 | 36 | ExecutionStatus(char value) { 37 | this.value = value; 38 | } 39 | 40 | /** 41 | * Print the character. 42 | * @return character 43 | */ 44 | public String toString() { 45 | return Character.toString(this.value); 46 | } 47 | 48 | /** 49 | * Get the ExecutionStatus for a given character. 50 | * @param c a given character 51 | * @return an ExecutionStatus 52 | */ 53 | public static ExecutionStatus getExecutionStatus(char c) { 54 | switch (c) { 55 | case 'n': 56 | case 'N': 57 | return NOT_RUN; 58 | case 'p': 59 | case 'P': 60 | return PASSED; 61 | case 'f': 62 | case 'F': 63 | return FAILED; 64 | case 'b': 65 | case 'B': 66 | return BLOCKED; 67 | } 68 | return null; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/ExecutionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 28 | * @since 1.9.0-1 29 | */ 30 | public enum ExecutionType { 31 | 32 | MANUAL(1), AUTOMATED(2); 33 | 34 | private final Integer value; 35 | 36 | ExecutionType(Integer value) { 37 | this.value = value; 38 | } 39 | 40 | /** 41 | * Get an ExecutionType for a given integer. 42 | * @param integer a given integer 43 | * @return an ExecutionType 44 | */ 45 | public static ExecutionType getExecutionType(Integer integer) { 46 | if (integer != null) { 47 | if (integer == 1) { 48 | return MANUAL; 49 | } else if (integer == 2) { 50 | return AUTOMATED; 51 | } 52 | } 53 | return null; 54 | } 55 | 56 | /** 57 | * Get value of execution type. 58 | * @return value of execution type 59 | */ 60 | public Integer getValue() { 61 | return value; 62 | } 63 | 64 | /* 65 | * (non-Javadoc) 66 | * 67 | * @see java.lang.Enum#toString() 68 | */ 69 | @Override 70 | public String toString() { 71 | return this.value.toString(); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/ResponseDetails.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 28 | * @since 1.9.0-1 29 | */ 30 | public enum ResponseDetails { 31 | 32 | FULL("full"), SIMPLE("simple"), VALUE("value"); 33 | 34 | private final String value; 35 | 36 | ResponseDetails(String value) { 37 | this.value = value; 38 | } 39 | 40 | /* 41 | * (non-Javadoc) 42 | * 43 | * @see java.lang.Enum#toString() 44 | */ 45 | @Override 46 | public String toString() { 47 | return this.value; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/TestCaseDetails.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Mario Fuentes - http://www.rhiscom.com 28 | * @since 1.9.3-4 29 | */ 30 | public enum TestCaseDetails { 31 | 32 | SIMPLE("simple"), SUMMARY("summary"), FULL("full"); 33 | 34 | private final String value; 35 | 36 | TestCaseDetails(String value) { 37 | this.value = value; 38 | } 39 | 40 | @Override 41 | public String toString() { 42 | return this.value; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/TestCaseStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Mario Fuentes - http://www.rhiscom.com 28 | * @since 1.9.3-4 29 | */ 30 | public enum TestCaseStatus { 31 | 32 | FINAL(7), FUTURE(6), OBSOLETE(5), REWORK(4), REVIEW_IN_PROGRESS(3), READY_FOR_REVIEW(2), DRAFT(1); 33 | 34 | private final Integer value; 35 | 36 | TestCaseStatus(Integer value) { 37 | this.value = value; 38 | } 39 | 40 | /** 41 | * Get value of test case status. 42 | * @return value of test case status 43 | */ 44 | public Integer getValue() { 45 | return value; 46 | } 47 | 48 | /** 49 | * Print value of test case status. 50 | * @return value of test case status 51 | */ 52 | public String toString() { 53 | return this.value.toString(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/TestCaseStepAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Mario Fuentes - http://www.rhiscom.com 28 | * @since 1.9.3-2 29 | */ 30 | public enum TestCaseStepAction { 31 | 32 | CREATE("create"), UPDATE("update"), PUSH("push"); 33 | 34 | private final String value; 35 | 36 | TestCaseStepAction(String value) { 37 | this.value = value; 38 | } 39 | 40 | /** 41 | * Print value of test case step action. 42 | * @return value of test case step action 43 | */ 44 | public String toString() { 45 | return this.value; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/TestImportance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 28 | * @since 1.9.0-1 29 | */ 30 | public enum TestImportance { 31 | 32 | LOW(1), MEDIUM(2), HIGH(3); 33 | 34 | private final Integer value; 35 | 36 | TestImportance(Integer value) { 37 | this.value = value; 38 | } 39 | 40 | /* 41 | * (non-Javadoc) 42 | * 43 | * @see java.lang.Enum#toString() 44 | */ 45 | @Override 46 | public String toString() { 47 | return Integer.toString(this.value); 48 | } 49 | 50 | /** 51 | * Get value of test importance 52 | * @return value of test importance 53 | */ 54 | public Integer getValue() { 55 | return this.value; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/TestLinkTables.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 28 | * @since 1.9.0-1 29 | */ 30 | public enum TestLinkTables { 31 | 32 | NODES_HIERARCHY("nodes_hierarchy"), REQUIREMENTS("requirements"), REQUIREMENT_SPECIFICATIONS( 33 | "req_specs"), EXECUTIONS("executions"); 34 | 35 | private final String value; 36 | 37 | TestLinkTables(String value) { 38 | this.value = value; 39 | } 40 | 41 | /* 42 | * (non-Javadoc) 43 | * 44 | * @see java.lang.Enum#toString() 45 | */ 46 | @Override 47 | public String toString() { 48 | return this.value; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/constants/TestLinkUser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.constants; 25 | 26 | /** 27 | * @author Bruno P. Kinoshita 28 | * @since 1.9.0-1 29 | */ 30 | public enum TestLinkUser { 31 | 32 | NOBODY(-1), SOMEBODY(-2), NO_USER(-1), ANYBODY(0); 33 | 34 | private final Integer value; 35 | 36 | TestLinkUser(Integer value) { 37 | this.value = value; 38 | } 39 | 40 | /** 41 | * Print user. 42 | * @return user 43 | */ 44 | public String toString() { 45 | return Integer.toString(this.value); 46 | } 47 | 48 | /** 49 | * Get user type from a given value. 50 | * @param value a given value 51 | * @return a TestLinkUser 52 | */ 53 | public static TestLinkUser getTestLinkUser(Integer value) { 54 | switch (value) { 55 | case -1: 56 | return NOBODY; 57 | case -2: 58 | return SOMEBODY; 59 | case 0: 60 | return ANYBODY; 61 | } 62 | return null; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/br/eti/kinoshita/testlinkjavaapi/util/TestLinkAPIException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.util; 25 | 26 | /** 27 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 28 | * @since 1.9.0-1 29 | */ 30 | public class TestLinkAPIException extends RuntimeException { 31 | 32 | private static final long serialVersionUID = -2528132734907454631L; 33 | /** 34 | * Error Code. 35 | */ 36 | private Integer code; 37 | 38 | /** 39 | * Default constructor. 40 | */ 41 | public TestLinkAPIException() { 42 | } 43 | 44 | /** 45 | * @param message the message 46 | */ 47 | public TestLinkAPIException(String message) { 48 | super(message); 49 | } 50 | 51 | /** 52 | * Constructor with args. 53 | * 54 | * @param code code 55 | * @param message message 56 | */ 57 | public TestLinkAPIException(Integer code, String message) { 58 | super(message); 59 | this.code = code; 60 | } 61 | 62 | /** 63 | * @param cause cause 64 | */ 65 | public TestLinkAPIException(Throwable cause) { 66 | super(cause); 67 | } 68 | 69 | /** 70 | * @param message message 71 | * @param cause cause 72 | */ 73 | public TestLinkAPIException(String message, Throwable cause) { 74 | super(message, cause); 75 | } 76 | 77 | /** 78 | * @return Error Code 79 | */ 80 | public Integer getCode() { 81 | return this.code; 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/site/apt/downloads.apt: -------------------------------------------------------------------------------- 1 | Download 2 | 3 | In order to use TestLink Java API in your project simply put its jar in your project 4 | build path and start coding. 5 | 6 | For a list of dependencies required for compiling and running TestLink 7 | Java API, please refer to {{{/dependencies.html}dependencies}} section. 8 | 9 | * Maven artifact 10 | 11 | If you are using Maven then you can add a dependency to TestLink Java API. 12 | 13 | +---+ 14 | 15 | br.eti.kinoshita 16 | testlink-java-api 17 | 1.9.6-1 18 | 19 | +---+ 20 | 21 | * TestLink Java API jar 22 | 23 | Download TestLink Java API's jar directly from 24 | {{{http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22br.eti.kinoshita%22%20AND%20a%3A%22testlink-java-api%22}Maven Central Repository}} 25 | and add it to your project build path. 26 | -------------------------------------------------------------------------------- /src/site/apt/exceptions.apt: -------------------------------------------------------------------------------- 1 | Exception Handling 2 | 3 | The API encapsulates checked Exceptions within 4 | br.eti.kinoshita.testlinkjavaapi.TestLinkAPIException, which is an unchecked 5 | exception (i.e.: it extends RuntimeException). -------------------------------------------------------------------------------- /src/site/apt/extending.apt: -------------------------------------------------------------------------------- 1 | Extending TestLink Java API 2 | 3 | * Implement new methods or correct existing ones. 4 | 5 | Check what methods in the XML-RPC API are missing in the Java API, or are 6 | wrongly implemented. Then choose the right service (TestCaseService, 7 | TestProjectService and so on) and write your new method, following one of the 8 | existing ones. 9 | 10 | * Write unit tests. 11 | 12 | There are more than fifty test cases in the project, with code and branch 13 | coverage of over 60%. Here we always recommend that you write a good test 14 | with good coverage. And if you have the karma, write more tests to cover other 15 | parts of the system. 16 | 17 | * Final step, send it to testlink-java-api team. 18 | 19 | Send us your patch, or if you forked the repository in GitHub, just let us know 20 | what are the repos and we will take a look on it. Once your code is accepted 21 | you will be automatically added to the contributors list in the pom.xml. If 22 | you are willing continue to help with the project you will be very welcome too. 23 | 24 | -------------------------------------------------------------------------------- /src/site/apt/implemented_methods.apt: -------------------------------------------------------------------------------- 1 | List of methods from TestLink XML-RPC API implemented in TestLink Java API 2 | 3 | * tl.assignTestCaseExecutionTask 4 | 5 | * tl.createTestProject 6 | 7 | * tl.getTestProjectByName 8 | 9 | * tl.checkDevKey 10 | 11 | * tl.getProjects 12 | 13 | * tl.createTestPlan 14 | 15 | * tl.getTestPlanByName 16 | 17 | * tl.getProjectTestPlans 18 | 19 | * tl.getTestPlanPlatforms 20 | 21 | * tl.createTestCase 22 | 23 | * tl.updateTestCase 24 | 25 | * tl.createTestCaseSteps 26 | 27 | * tl.deleteTestCaseSteps 28 | 29 | * tl.createTestSuite 30 | 31 | * tl.addTestCaseToTestPlan 32 | 33 | * tl.doesUserExist 34 | 35 | * tl.getUserByLogin 36 | 37 | * tl.sayHello 38 | 39 | * tl.about 40 | 41 | * tl.getTestSuiteByID 42 | 43 | * tl.setTestMode 44 | 45 | * tl.repeat 46 | 47 | * tl.getTestCase 48 | 49 | * tl.getTestCasesForTestSuite 50 | 51 | * tl.createBuild 52 | 53 | * tl.getTestCasesForTestPlan 54 | 55 | * tl.getTestCaseIDByName 56 | 57 | * tl.getTestSuitesForTestPlan 58 | 59 | * tl.uploadAttachment 60 | 61 | * tl.uploadTestCaseAttachment 62 | 63 | * tl.uploadTestSuiteAttachment 64 | 65 | * tl.uploadTestProjectAttachment 66 | 67 | * tl.uploadRequirementAttachment 68 | 69 | * tl.uploadRequirementSpecificationAttachment 70 | 71 | * tl.getTestCaseAttachments 72 | 73 | * tl.uploadExecutionAttachment 74 | 75 | * tl.deleteExecution 76 | 77 | * tl.getFullPath 78 | 79 | * tl.assignRequirements 80 | 81 | * tl.getTestSuitesForTestSuite 82 | 83 | * tl.getFirstLevelTestSuitesForTestProject 84 | 85 | * tl.reportTCResult 86 | 87 | * tl.getLastExecutionResult 88 | 89 | * tl.getBuildsForTestPlan 90 | 91 | * tl.getLatestBuildForTestPlan 92 | 93 | * tl.getTestCaseKeywords 94 | 95 | * tl.getTestCaseCustomFieldDesignValue 96 | 97 | * tl.getTestCaseCustomFieldTestPlanDesignValue 98 | 99 | * tl.getTestCaseCustomFieldExecutionValue 100 | 101 | * tl.getTestPlanCustomFieldDesignValue 102 | 103 | * tl.getTotalsForTestPlan 104 | 105 | * tl.getExecCountersByBuild 106 | 107 | * tl.updateTestCaseCustomFieldDesignValue 108 | 109 | * tl.setTestCaseExecutionType 110 | 111 | * tl.getProjectPlatforms 112 | 113 | * tl.removePlatformFromTestPlan 114 | 115 | * tl.addPlatformToTestPlan 116 | 117 | * tl.updateBuildCustomFieldsValues 118 | -------------------------------------------------------------------------------- /src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | TestLink Java API 2 | 3 | TestLink Java API is a Java API that interfaces TestLink XML-RPC API. 4 | This API lets you call TestLink internal methods such as createTestProject, 5 | uploadAttachment, getTestProjectByName and others. 6 | 7 | <>. 9 | 10 | Our aim with this project is always release one version of this API after a new 11 | version of TestLink has been released. Let's say TestLink releases 12 | version 2.0, we will release testlink-java-api-2.0-1. Where -1 reprensents the 13 | internal version, for control of bug fixes and enhancements in the Java API. 14 | 15 | One fact to keep in mind is that TestLink Java API can't assure you Backward 16 | Compabitility among its versions. It occurs because TestLink XML-RPC API is 17 | constantly changing. Even some methods are renamed. So trying to keep 18 | Backward Compatibility would be really cumbersome. 19 | 20 | Another important thing is that behind the scenes we are using XML-RPC to 21 | communicate with TestLink. The Java API abstracts the calls, providing objects 22 | that represent the entities in TestLink. This way you build your objects and 23 | retrieve objects from TestLink. You can still use low level XML-RPC, with a 24 | Hashmap with the parameters. 25 | 26 | If you call the method getTestPlanPlatforms it will return an array of 27 | Platform (an object in TestLink Java API). This way you won't need handle 28 | Maps. In case of any error, the message will come to you wrapped in a 29 | TestLinkAPIException. This is the basic concepts to get the gist of the 30 | TestLink Java API. 31 | 32 | * Open source licenses donated for this project 33 | 34 | [./images/stan4j-88x31-o1.png] 35 | 36 | {{{http://stan4j.com}Stan4J}} -------------------------------------------------------------------------------- /src/site/apt/related_projects.apt: -------------------------------------------------------------------------------- 1 | Related projects 2 | 3 | This page lists projects related to ours. 4 | 5 | * {{{http://www.testlink.org}TestLink}} 6 | 7 | * {{{http://code.google.com/p/dbfacade-testlink-rpc-api/}dbfacade-testlink-rpc-api}} 8 | 9 | * {{{http://code.google.com/p/testlink-api-java-client/}testlink-api-java-client}} 10 | 11 | -------------------------------------------------------------------------------- /src/site/apt/roadmap.apt: -------------------------------------------------------------------------------- 1 | Roadmap 2 | 3 | TestLink Java API is an API that is always accompanying TestLink XML-RPC API. 4 | It means that when TestLink releases a new version we are already working on 5 | a new version that is 100% compatible with TestLink's new version. 6 | It also means that if you want to use TestLink Java API with TestLink 1.9, you have 7 | to use TestLink Java API version 1.9. 8 | 9 | * version 2.0 10 | 11 | * Keep 100% compatibility with TestLink XML-RPC API 12 | -------------------------------------------------------------------------------- /src/site/apt/sample1.apt: -------------------------------------------------------------------------------- 1 | Creating a new instance of the API object 2 | 3 | +-----+ 4 | String url = "http://:/testlink/lib/api/xmlrpc.php"; 5 | String devKey = "key"; 6 | TestLinkAPI api = null; 7 | 8 | URL testlinkURL = null; 9 | 10 | try { 11 | testlinkURL = new URL(url); 12 | } catch ( MalformedURLException mue ) { 13 | mue.printStackTrace( System.err ); 14 | System.exit(-1); 15 | } 16 | 17 | try { 18 | api = new TestLinkAPI(testlinkURL, devKey); 19 | } catch( TestLinkAPIException te) { 20 | te.printStackTrace( System.err ); 21 | System.exit(-1); 22 | } 23 | 24 | System.out.println(api.ping()); 25 | +-----+ 26 | -------------------------------------------------------------------------------- /src/site/apt/sample2.apt: -------------------------------------------------------------------------------- 1 | Creating a new Test Project 2 | 3 | +-----+ 4 | 5 | TestProject project = null; 6 | 7 | try { 8 | project = api.createTestProject( 9 | "Minecraft", //testProjectName 10 | "MC", //testProjectPrefix 11 | "Testing Minecraft game", //notes 12 | true, //enableRequirements 13 | true, //enableTestPriority 14 | true, //enableAutomation 15 | false, //enableInventory 16 | true, //isActive 17 | true); //isPublic 18 | } catch (TestLinkAPIException e) { 19 | e.printStackTrace( System.err ); 20 | System.exit(-1); 21 | } 22 | 23 | System.out.println( "Test project created! " ); 24 | 25 | System.out.println( "Test Project ID: [ " + project.getId() + " ]." ); 26 | 27 | +-----+ -------------------------------------------------------------------------------- /src/site/apt/sample3.apt: -------------------------------------------------------------------------------- 1 | Uploading an attachment to a test case execution 2 | 3 | In this example I'm using commons-io and commons-codec to retrieve the 4 | attachment content Base64 encoded. 5 | 6 | +-----+ 7 | 8 | File attachmentFile = new File("c:\\tmp\\selenium_temp.jpg"); 9 | 10 | String fileContent = null; 11 | 12 | try { 13 | byte[] byteArray = FileUtils.readFileToByteArray(attachmentFile); 14 | fileContent = new String(Base64.encodeBase64(byteArray)); 15 | } catch (IOException e) { 16 | e.printStackTrace( System.err ); 17 | System.exit(-1); 18 | } 19 | 20 | Attachment attachment = api.uploadExecutionAttachment( 21 | 1, //executionId 22 | "Setting customer plan", //title 23 | "In this screen the attendant is defining the customer plan", //description 24 | "screenshot_customer_plan_"+System.currentTimeMillis()+".jpg", //fileName 25 | "image/jpeg", //fileType 26 | fileContent); //content 27 | 28 | System.out.println("Attachment uploaded"); 29 | 30 | +-----+ -------------------------------------------------------------------------------- /src/site/apt/sample4.apt: -------------------------------------------------------------------------------- 1 | Creating a test case with steps. 2 | 3 | In this example we will create a simple test case that contains test steps. 4 | 5 | +-----+ 6 | 7 | List steps = new ArrayList(); 8 | TestCaseStep step = new TestCaseStep(); 9 | step.setNumber(1); 10 | step.setExpectedResults("User name appeared in top menu."); 11 | step.setExecutionType(ExecutionType.MANUAL); 12 | step.setActions("Go to login screen and enter user credentials."); 13 | steps.add(step); 14 | 15 | TestCase tc = api.createTestCase( 16 | "TcName", // testCaseName 17 | new Integer(2), // testSuiteId 18 | new Integer(1), // testProjectId 19 | "admin", // authorLogin 20 | "No summary", // summary 21 | steps, // steps 22 | null, // preconditions 23 | TestImportance.HIGH, // importance 24 | ExecutionType.MANUAL, // execution 25 | new Integer(10), // order 26 | null, // internalId 27 | null, // checkDuplicatedName 28 | null); // actionOnDuplicatedName 29 | 30 | System.out.println("Test case with steps created"); 31 | 32 | +-----+ -------------------------------------------------------------------------------- /src/site/apt/structure.apt: -------------------------------------------------------------------------------- 1 | API Structure 2 | 3 | [./images/structure.png] Generated with Stan4J -------------------------------------------------------------------------------- /src/site/resources/images/stan4j-88x31-o1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kinow/testlink-java-api/7877d1b8abe9727436a774d012c47952be51e4fb/src/site/resources/images/stan4j-88x31-o1.png -------------------------------------------------------------------------------- /src/site/resources/images/structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kinow/testlink-java-api/7877d1b8abe9727436a774d012c47952be51e4fb/src/site/resources/images/structure.png -------------------------------------------------------------------------------- /src/site/resources/images/testlinkjavaapi-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kinow/testlink-java-api/7877d1b8abe9727436a774d012c47952be51e4fb/src/site/resources/images/testlinkjavaapi-logo-white.png -------------------------------------------------------------------------------- /src/site/resources/images/testlinkjavaapi-logo-white.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kinow/testlink-java-api/7877d1b8abe9727436a774d012c47952be51e4fb/src/site/resources/images/testlinkjavaapi-logo-white.xcf -------------------------------------------------------------------------------- /src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | TestLink Java API 11 | images/testlinkjavaapi-logo-white.png 12 | http://kinow.github.io/testlink-java-api/ 13 | TestLink Java API 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | org.apache.maven.skins 56 | maven-fluido-skin 57 | 1.6 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/build/TestCreateBuild.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.build; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Build; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | */ 37 | public class TestCreateBuild extends BaseTest { 38 | 39 | @DataProvider(name = "buildData") 40 | public Object[][] createData() { 41 | return new Object[][] { { 10, "Build Notes" } }; 42 | } 43 | 44 | @Test(dataProvider = "buildData") 45 | public void testCreateBuild(Integer testPlanId, String buildNotes) { 46 | this.loadXMLRPCMockData("tl.createBuild.xml"); 47 | 48 | Build build = null; 49 | 50 | try { 51 | build = api.createBuild(testPlanId, "Sample build " + System.currentTimeMillis(), buildNotes); 52 | } catch (TestLinkAPIException e) { 53 | Assert.fail(e.getMessage(), e); 54 | } 55 | 56 | Assert.assertNotNull(build); 57 | 58 | Assert.assertTrue(build.getId() > 0); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/build/TestGetBuildsForTestPlan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.build; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Build; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | */ 37 | public class TestGetBuildsForTestPlan extends BaseTest { 38 | 39 | @DataProvider(name = "testPlanData") 40 | public Object[][] createData() { 41 | return new Object[][] { { 5, 7, "tdc-1.0", "Build creado automaticamente con TestLink Jenkins Plug-in." } }; 42 | } 43 | 44 | @Test(dataProvider = "testPlanData") 45 | public void testGetBuildsForTestPlan(Integer testPlanId, Integer buildId, String buildName, String buildNotes) { 46 | this.loadXMLRPCMockData("tl.getBuildsForTestPlan.xml"); 47 | 48 | Build[] builds = null; 49 | 50 | try { 51 | builds = api.getBuildsForTestPlan(testPlanId); 52 | } catch (TestLinkAPIException e) { 53 | Assert.fail(e.getMessage(), e); 54 | } 55 | 56 | Assert.assertNotNull(builds); 57 | 58 | Assert.assertTrue(builds.length > 0); 59 | 60 | Assert.assertEquals(builds.length, 1); 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/build/TestGetExecCountersByBuild.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.build; 25 | 26 | import java.util.Map; 27 | 28 | import org.testng.Assert; 29 | import org.testng.annotations.DataProvider; 30 | import org.testng.annotations.Test; 31 | 32 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 33 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 34 | 35 | /** 36 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 37 | */ 38 | public class TestGetExecCountersByBuild extends BaseTest { 39 | 40 | @DataProvider(name = "testPlanData") 41 | public Object[][] createData() { 42 | return new Object[][] { { 5 } }; 43 | } 44 | 45 | @Test(dataProvider = "testPlanData") 46 | public void testGetExecCountersByBuild(Integer testPlanId) { 47 | this.loadXMLRPCMockData("tl.getExecCountersByBuild.xml"); 48 | 49 | Map response = null; 50 | 51 | try { 52 | response = api.getExecCountersByBuild(testPlanId); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(response); 58 | 59 | Assert.assertNotNull(response.get("raw")); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/build/TestGetLatestBuildForTestPlan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.build; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Build; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestGetLatestBuildForTestPlan extends BaseTest { 39 | 40 | @DataProvider(name = "buildData") 41 | public Object[][] createData() { 42 | return new Object[][] { { 5, 7, "tdc-1.0", "Build creado automaticamente con TestLink Jenkins Plug-in." } }; 43 | } 44 | 45 | @Test(dataProvider = "buildData") 46 | public void testGetLatestBuildForTestPlan(Integer testPlanId, Integer buildId, String buildName, 47 | String buildNotes) { 48 | this.loadXMLRPCMockData("tl.getLatestBuildForTestPlan.xml"); 49 | Build build = null; 50 | 51 | try { 52 | build = api.getLatestBuildForTestPlan(testPlanId); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(build); 58 | 59 | Assert.assertTrue(build.getId() > 0); 60 | 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/other/issue3216884/TestDevKeyIssue3216884.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.other.issue3216884; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.Test; 28 | 29 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 30 | import br.eti.kinoshita.testlinkjavaapi.TestLinkAPI; 31 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | * @since 1.9.1-1 36 | */ 37 | public class TestDevKeyIssue3216884 extends BaseTest { 38 | 39 | @Test() 40 | public void testCheckValidKey() { 41 | this.loadXMLRPCMockData("tl.checkDevKey.xml"); 42 | try { 43 | Assert.assertTrue(this.api.checkDevKey(api.getDevKey())); 44 | } catch (TestLinkAPIException e) { 45 | Assert.fail("Error checking devKey: " + e.getMessage(), e); 46 | } 47 | } 48 | 49 | @Test(expectedExceptions = { TestLinkAPIException.class }) 50 | public void testCheckInvalidKey() { 51 | this.loadXMLRPCMockData("tl.checkDevKey_invalid.xml"); 52 | this.api = new TestLinkAPI(this.api.getUrl(), "Haruki Murakami"); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/requirement/TestAssignRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.requirement; 25 | 26 | import java.util.ArrayList; 27 | import java.util.List; 28 | 29 | import org.testng.Assert; 30 | import org.testng.annotations.Test; 31 | 32 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 33 | import br.eti.kinoshita.testlinkjavaapi.model.Requirement; 34 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 35 | 36 | /** 37 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 38 | */ 39 | public class TestAssignRequirement extends BaseTest { 40 | 41 | @Test 42 | public void testAssignRequirement() { 43 | this.loadXMLRPCMockData("tl.assignRequirements.xml"); 44 | 45 | List requirements = new ArrayList<>(); 46 | 47 | Requirement requirement = new Requirement(); 48 | requirement.setId(12); 49 | requirement.setReqSpecId(11); 50 | 51 | requirements.add(requirement); 52 | 53 | requirement = new Requirement(); 54 | requirement.setId(14); 55 | requirement.setReqSpecId(11); 56 | 57 | requirements.add(requirement); 58 | 59 | try { 60 | this.api.assignRequirements(4, 1, requirements); 61 | } catch (TestLinkAPIException e) { 62 | Assert.fail(e.getMessage(), e); 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestAddTestCaseKeyWords.java: -------------------------------------------------------------------------------- 1 | package br.eti.kinoshita.testlinkjavaapi.testcase; 2 | 3 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 4 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 5 | import org.testng.Assert; 6 | import org.testng.annotations.DataProvider; 7 | import org.testng.annotations.Test; 8 | import org.testng.collections.Lists; 9 | 10 | import java.util.HashMap; 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | /** 15 | * Created by spravallika on 25/06/17. 16 | */ 17 | public class TestAddTestCaseKeyWords extends BaseTest { 18 | @DataProvider(name = "testCaseKeywordsData") 19 | public Object[][] createDate() { 20 | return new Object[][]{{"1", "Sanity"}}; 21 | } 22 | 23 | @Test(dataProvider = "testCaseKeywordsData") 24 | public void addTestCaseKeyWords(String testCaseExternalId, String keyword) { 25 | this.loadXMLRPCMockData("tl.addTestCaseKeyWords.xml"); 26 | 27 | Map> testcaseKeywordsMap = new HashMap<>(); 28 | testcaseKeywordsMap.put(testCaseExternalId, Lists.newArrayList(keyword)); 29 | Map response = null; 30 | try { 31 | response = api.addTestCaseKeywords(testcaseKeywordsMap); 32 | } catch (TestLinkAPIException e) { 33 | Assert.fail(e.getMessage(), e); 34 | } 35 | 36 | Assert.assertEquals(response.get("status_ok").toString(), "true"); 37 | Assert.assertNotNull(response); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestAddTestCaseToTestPlan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | */ 36 | public class TestAddTestCaseToTestPlan extends BaseTest { 37 | 38 | @DataProvider(name = "testCaseAndTestPlanData") 39 | public Object[][] createData() { 40 | return new Object[][] { { 1, 10, 4, 1, 2 } }; 41 | } 42 | 43 | @Test(dataProvider = "testCaseAndTestPlanData") 44 | public void testAddTestCaseToTestPlan(Integer testProjectId, Integer testPlanId, Integer testCaseId, 45 | Integer version, Integer platformId) { 46 | this.loadXMLRPCMockData("tl.addTestCaseToTestPlan.xml"); 47 | Integer featureId; 48 | 49 | try { 50 | featureId = api.addTestCaseToTestPlan(testProjectId, testPlanId, testCaseId, version, platformId, null, 51 | null); 52 | 53 | Assert.assertTrue(featureId > 0); 54 | } catch (TestLinkAPIException e) { 55 | String message = e.getMessage(); 56 | Assert.assertTrue(message.contains("Test Case version is already linked to Test Plan")); 57 | } 58 | 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestCreateTestCase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestCase; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | * @since 1.0 37 | */ 38 | public class TestCreateTestCase extends BaseTest { 39 | 40 | @DataProvider(name = "testCaseData") 41 | public Object[][] createData() { 42 | return new Object[][] { { 2, 1, "admin", "Sample summary.", "No preconditions." } }; 43 | } 44 | 45 | @Test(dataProvider = "testCaseData") 46 | public void testCreateTestCase(Integer testSuiteId, Integer testProjectId, String authorLogin, String summary, 47 | String preconditions) { 48 | this.loadXMLRPCMockData("tl.createTestCase.xml"); 49 | 50 | TestCase testCase = null; 51 | 52 | try { 53 | testCase = api.createTestCase("Sample Test Case " + System.currentTimeMillis(), testSuiteId, testProjectId, 54 | authorLogin, summary, null, preconditions, null, null, null, null, null, null, null); 55 | } catch (TestLinkAPIException e) { 56 | Assert.fail(e.getMessage(), e); 57 | } 58 | 59 | Assert.assertNotNull(testCase); 60 | 61 | Assert.assertTrue(testCase.getId() > 0); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestDeleteExecution.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | */ 36 | public class TestDeleteExecution extends BaseTest { 37 | 38 | @DataProvider(name = "executionData") 39 | public Object[][] createData() { 40 | return new Object[][] { { 1 } }; 41 | } 42 | 43 | @Test(dataProvider = "executionData") 44 | public void testDeleteExecution(Integer executionId) { 45 | this.loadXMLRPCMockData("tl.deleteExecution.xml"); 46 | 47 | try { 48 | this.api.deleteExecution(executionId); 49 | } catch (TestLinkAPIException e) { 50 | Assert.fail(e.getMessage(), e); 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetFullPath.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | */ 36 | public class TestGetFullPath extends BaseTest { 37 | 38 | @DataProvider(name = "simpleChildrenTestCases") 39 | public Object[][] createData() { 40 | return new Object[][] { { 4 } }; 41 | } 42 | 43 | @Test(dataProvider = "simpleChildrenTestCases") 44 | public void testGetFullPath(Integer nodeId) { 45 | this.loadXMLRPCMockData("tl.getFullPath.xml"); 46 | String[] nodes = null; 47 | 48 | try { 49 | nodes = this.api.getFullPath(nodeId); 50 | } catch (TestLinkAPIException e) { 51 | Assert.fail(e.getMessage(), e); 52 | } 53 | 54 | Assert.assertNotNull(nodes); 55 | 56 | Assert.assertTrue(nodes.length > 0); 57 | 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetLastExecutionResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Execution; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | */ 37 | public class TestGetLastExecutionResult extends BaseTest { 38 | 39 | @DataProvider(name = "executionData") 40 | public Object[][] createData() { 41 | return new Object[][] { { 10, 8 } }; 42 | } 43 | 44 | @Test(dataProvider = "executionData") 45 | public void testGetLastExecutionResult(Integer testPlanId, Integer testCaseId) { 46 | this.loadXMLRPCMockData("tl.getLastExecutionResult.xml"); 47 | 48 | Execution execution = null; 49 | 50 | try { 51 | execution = this.api.getLastExecutionResult(testPlanId, testCaseId, null, 52 | null, null, null, null, null); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(execution); 58 | 59 | Assert.assertTrue(execution.getId() > 0); 60 | 61 | System.out.println(execution); 62 | 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetTestCase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestCase; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | */ 37 | public class TestGetTestCase extends BaseTest { 38 | 39 | @DataProvider(name = "testCaseData") 40 | public Object[][] createData() { 41 | return new Object[][] { { 4, 1 }, { 6, 1 } }; 42 | } 43 | 44 | @Test(dataProvider = "testCaseData") 45 | public void testGetTestCase(Integer testCaseId, Integer version) { 46 | this.loadXMLRPCMockData("tl.getTestCase.xml"); 47 | 48 | TestCase testCase = null; 49 | 50 | try { 51 | testCase = this.api.getTestCase(testCaseId, null, version); 52 | } catch (TestLinkAPIException e) { 53 | Assert.fail(e.getMessage(), e); 54 | } 55 | 56 | Assert.assertNotNull(testCase); 57 | 58 | Assert.assertTrue(testCase.getId() > 0); 59 | 60 | Assert.assertNotNull(testCase.getSteps()); 61 | 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetTestCaseAttachments.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Attachment; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | * @since 1.0 37 | */ 38 | public class TestGetTestCaseAttachments extends BaseTest { 39 | 40 | @DataProvider(name = "tcsWithASingleAttachment") 41 | public Object[][] createData() { 42 | return new Object[][] { { 4 } }; 43 | } 44 | 45 | @Test(dataProvider = "tcsWithASingleAttachment") 46 | public void testGetTestCaseAttachments(Integer testCaseId) { 47 | this.loadXMLRPCMockData("tl.getTestCaseAttachments.xml"); 48 | 49 | Attachment[] attachments = null; 50 | 51 | try { 52 | attachments = this.api.getTestCaseAttachments(testCaseId, null, null); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(attachments); 58 | 59 | Assert.assertTrue(attachments.length > 0); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetTestCaseBugs.java: -------------------------------------------------------------------------------- 1 | package br.eti.kinoshita.testlinkjavaapi.testcase; 2 | 3 | import static org.testng.Assert.assertEquals; 4 | import static org.testng.Assert.assertTrue; 5 | 6 | import java.util.List; 7 | 8 | import org.testng.annotations.DataProvider; 9 | import org.testng.annotations.Test; 10 | 11 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 12 | 13 | /** 14 | * From: https://github.com/kinow/testlink-java-api/issues/82 15 | */ 16 | public class TestGetTestCaseBugs extends BaseTest { 17 | @DataProvider(name = "testGetTestCaseBugsData") 18 | public Object[][] createDate() { 19 | return new Object[][] { { 1, 5, 3, 2 } }; 20 | } 21 | 22 | @Test(dataProvider = "testGetTestCaseBugsData") 23 | public void addTestCaseKeyWords(Integer testCaseExternalId, Integer testPlanId, Integer testCaseId, 24 | Integer buildId) { 25 | this.loadXMLRPCMockData("tl.getTestCaseBugs.xml"); 26 | List o = api.getTestCaseBugs(testPlanId, testCaseId, testCaseExternalId, null, null, buildId, null); 27 | 28 | assertTrue(o.size() > 0); 29 | assertEquals(1, (int) o.get(0)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetTestCaseIDByName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | */ 36 | public class TestGetTestCaseIDByName extends BaseTest { 37 | 38 | @DataProvider(name = "testCaseData") 39 | public Object[][] createData() { 40 | return new Object[][] { { "Sample Test Case 001", "Sample test suite", "Sample project" }, 41 | { "Sample test Case 002", "Sample test suite", "Sample project" } }; 42 | } 43 | 44 | @Test(dataProvider = "testCaseData") 45 | public void testGetTestCaseIDByName(String testCaseName, String testSuiteName, String testProjectName) { 46 | this.loadXMLRPCMockData("tl.getTestCaseIDByName.xml"); 47 | 48 | Integer testCaseId = null; 49 | try { 50 | testCaseId = this.api.getTestCaseIDByName(testCaseName, testSuiteName, testProjectName, null); 51 | } catch (TestLinkAPIException e) { 52 | Assert.fail(e.getMessage(), e); 53 | } 54 | 55 | Assert.assertNotNull(testCaseId); 56 | 57 | Assert.assertTrue(testCaseId > 0); 58 | 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetTestCaseKeywords.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import java.util.List; 27 | 28 | import org.testng.Assert; 29 | import org.testng.annotations.DataProvider; 30 | import org.testng.annotations.Test; 31 | 32 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 33 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 34 | 35 | /** 36 | * @author s2o 37 | */ 38 | public class TestGetTestCaseKeywords extends BaseTest { 39 | 40 | @DataProvider(name = "testGetTestCaseKeywords") 41 | public Object[][] createData() { 42 | return new Object[][] { { 1, 1 } }; 43 | } 44 | 45 | @Test(dataProvider = "testGetTestCaseKeywords") 46 | public void testGetTestCaseKeywords(Integer testProjectId, Integer testCaseId) { 47 | this.loadXMLRPCMockData("tl.getTestCaseKeywords.xml"); 48 | 49 | List keywords = null; 50 | 51 | try { 52 | keywords = this.api.getTestCaseKeywords(testProjectId, testCaseId); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(keywords); 58 | 59 | Assert.assertTrue(keywords.size() > 0); 60 | 61 | Assert.assertNotNull(keywords.get(0)); 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetTestCasesForTestPlanEmptyResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestCase; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | * @author Mario Fuentes - http://www.rhiscom.com 37 | * @since 1.9.3-4 38 | */ 39 | public class TestGetTestCasesForTestPlanEmptyResult extends BaseTest { 40 | 41 | @DataProvider(name = "testPlanEmptyData") 42 | public Object[][] createTestPlanData() { 43 | return new Object[][] { { 10 } }; 44 | } 45 | 46 | @Test(dataProvider = "testPlanEmptyData") 47 | public void testGetTestCasesForTestPlan(Integer testPlanId) { 48 | this.loadXMLRPCMockData("tl.getTestCasesForTestPlanEmptyResult.xml"); 49 | 50 | TestCase[] testCases = null; 51 | 52 | try { 53 | testCases = this.api.getTestCasesForTestPlan(testPlanId, null, null, null, null, null, null, null, null, 54 | null, null); 55 | } catch (TestLinkAPIException e) { 56 | Assert.fail(e.getMessage(), e); 57 | } 58 | 59 | Assert.assertNotNull(testCases); 60 | 61 | Assert.assertEquals(testCases.length, 0); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetTestCasesForTestSuite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.constants.TestCaseDetails; 32 | import br.eti.kinoshita.testlinkjavaapi.model.TestCase; 33 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 34 | 35 | /** 36 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 37 | */ 38 | public class TestGetTestCasesForTestSuite extends BaseTest { 39 | 40 | @DataProvider(name = "testCaseData") 41 | public Object[][] createData() { 42 | return new Object[][] { { 2 } }; 43 | } 44 | 45 | @Test(dataProvider = "testCaseData") 46 | public void testGetTestCasesForTestSuite(Integer testSuiteId) { 47 | this.loadXMLRPCMockData("tl.getTestCasesForTestSuite.xml"); 48 | 49 | TestCase[] testCases = null; 50 | 51 | try { 52 | testCases = this.api.getTestCasesForTestSuite(testSuiteId, true, TestCaseDetails.FULL); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(testCases); 58 | 59 | Assert.assertTrue(testCases.length > 0); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestGetTestCasesForTestSuiteEmptyResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.constants.TestCaseDetails; 32 | import br.eti.kinoshita.testlinkjavaapi.model.TestCase; 33 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 34 | 35 | /** 36 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 37 | * @author Mario Fiuentes - http://www.rhiscom.com 38 | * @since 1.9.3-4 39 | */ 40 | public class TestGetTestCasesForTestSuiteEmptyResult extends BaseTest { 41 | 42 | @DataProvider(name = "testCaseData") 43 | public Object[][] createData() { 44 | return new Object[][] { { 2 } }; 45 | } 46 | 47 | @Test(dataProvider = "testCaseData") 48 | public void testGetTestCasesForTestSuiteEmptyResult(Integer testSuiteId) { 49 | this.loadXMLRPCMockData("tl.getTestCasesForTestSuiteEmptyResult.xml"); 50 | 51 | TestCase[] testCases = null; 52 | 53 | try { 54 | testCases = this.api.getTestCasesForTestSuite(testSuiteId, true, TestCaseDetails.FULL); 55 | } catch (TestLinkAPIException e) { 56 | Assert.fail(e.getMessage(), e); 57 | } 58 | 59 | Assert.assertNotNull(testCases); 60 | 61 | Assert.assertEquals(testCases.length, 0); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testcase/TestSetTestCaseExecutionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) 2010 Bruno P. Kinoshita http://www.kinoshita.eti.br 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testcase; 25 | 26 | import java.util.Map; 27 | 28 | import org.testng.Assert; 29 | import org.testng.annotations.DataProvider; 30 | import org.testng.annotations.Test; 31 | 32 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 33 | import br.eti.kinoshita.testlinkjavaapi.constants.ExecutionType; 34 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 35 | 36 | /** 37 | * 38 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 39 | * @since 0.1 40 | */ 41 | public class TestSetTestCaseExecutionType extends BaseTest { 42 | 43 | @DataProvider(name = "testCaseData") 44 | public Object[][] createData() { 45 | return new Object[][] { { 1, 4, null, 1, ExecutionType.AUTOMATED } }; 46 | } 47 | 48 | @Test(dataProvider = "testCaseData") 49 | public void testSetTestCaseExecutionType(Integer testProjectId, Integer testCaseId, Integer testCaseExternalId, 50 | Integer versionNumber, ExecutionType executionType) { 51 | this.loadXMLRPCMockData("tl.setTestCaseExecutionType.xml"); 52 | 53 | Map response = null; 54 | try { 55 | response = this.api.setTestCaseExecutionType(testProjectId, testCaseId, testCaseExternalId, versionNumber, 56 | executionType); 57 | } catch (TestLinkAPIException e) { 58 | Assert.fail(e.getMessage(), e); 59 | } 60 | 61 | Assert.assertNotNull(response); 62 | 63 | Assert.assertTrue(Integer.parseInt(response.get("testprojectid").toString()) > 0); 64 | Assert.assertTrue(Integer.parseInt(response.get("testcaseid").toString()) > 0); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testplan/TestAddPlatformToTestPlan.java: -------------------------------------------------------------------------------- 1 | package br.eti.kinoshita.testlinkjavaapi.testplan; 2 | 3 | import java.util.Map; 4 | 5 | import org.testng.Assert; 6 | import org.testng.annotations.DataProvider; 7 | import org.testng.annotations.Test; 8 | 9 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 10 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 11 | 12 | /** 13 | * Tests the method addPlatformToTestPlan. 14 | * 15 | * @since 1.9.6-0 16 | */ 17 | public class TestAddPlatformToTestPlan extends BaseTest { 18 | 19 | @DataProvider(name = "addPlatformToTestPlan") 20 | public Object[][] createData() { 21 | return new Object[][] { { 1, 10, "browser" } }; 22 | } 23 | 24 | @Test(dataProvider = "addPlatformToTestPlan") 25 | public void testGetProjectPlatforms(Integer testProjectId, Integer testPlanId, String platformName) { 26 | this.loadXMLRPCMockData("tl.addPlatformToTestPlan.xml"); 27 | Map map = null; 28 | 29 | try { 30 | map = api.addPlatformToTestPlan(testProjectId, testPlanId, platformName); 31 | } catch (TestLinkAPIException e) { 32 | Assert.fail(e.getMessage(), e); 33 | } 34 | 35 | Assert.assertNotNull(map); 36 | 37 | Assert.assertNotNull(map.get("msg")); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testplan/TestCreateTestPlan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testplan; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestPlan; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestCreateTestPlan extends BaseTest { 39 | 40 | @DataProvider(name = "testPlanData") 41 | public Object[][] createData() { 42 | return new Object[][] { { "Sample project", "Sample notes.", true, true } }; 43 | } 44 | 45 | @Test(dataProvider = "testPlanData") 46 | public void testCreateTestPlan(String testProjectName, String notes, Boolean isActive, Boolean isPublic) { 47 | this.loadXMLRPCMockData("tl.createTestPlan.xml"); 48 | 49 | TestPlan testPlan = null; 50 | 51 | try { 52 | testPlan = api.createTestPlan("Sample plan " + System.currentTimeMillis(), testProjectName, notes, isActive, 53 | isPublic); 54 | } catch (TestLinkAPIException e) { 55 | Assert.fail(e.getMessage(), e); 56 | } 57 | 58 | Assert.assertNotNull(testPlan); 59 | 60 | Assert.assertTrue(testPlan.getId() > 0); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testplan/TestGetProjectTestPlans.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testplan; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestPlan; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | 36 | */ 37 | public class TestGetProjectTestPlans extends BaseTest { 38 | 39 | @DataProvider(name = "testProjectData") 40 | public Object[][] createData() { 41 | return new Object[][] { { 1 } }; 42 | } 43 | 44 | @Test(dataProvider = "testProjectData") 45 | public void testGetProjectTestPlans(Integer projectId) { 46 | this.loadXMLRPCMockData("tl.getProjectTestPlans.xml"); 47 | 48 | TestPlan[] testPlans = null; 49 | 50 | try { 51 | testPlans = this.api.getProjectTestPlans(projectId); 52 | } catch (Exception e) { 53 | Assert.fail(e.getMessage(), e); 54 | } 55 | 56 | Assert.assertNotNull(testPlans); 57 | 58 | Assert.assertTrue(testPlans.length > 0); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testplan/TestGetTestPlanByName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testplan; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestPlan; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | 36 | */ 37 | public class TestGetTestPlanByName extends BaseTest { 38 | 39 | @DataProvider(name = "testPlanData") 40 | public Object[][] createData() { 41 | return new Object[][] { { "Sample plan", "Sample project" } }; 42 | } 43 | 44 | @Test(dataProvider = "testPlanData") 45 | public void testGetTestPlanByName(String testPlanName, String testProjectName) { 46 | this.loadXMLRPCMockData("tl.getTestPlanByName.xml"); 47 | 48 | TestPlan testPlan = null; 49 | 50 | try { 51 | testPlan = this.api.getTestPlanByName(testPlanName, testProjectName); 52 | } catch (Exception e) { 53 | Assert.fail(e.getMessage(), e); 54 | } 55 | 56 | Assert.assertNotNull(testPlan); 57 | 58 | Assert.assertTrue(testPlan.getId() > 0); 59 | 60 | Assert.assertTrue(testPlan.getName() != null && testPlan.getName().length() > 0); 61 | 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testplan/TestGetTestPlanPlatforms.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testplan; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Platform; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | 36 | */ 37 | public class TestGetTestPlanPlatforms extends BaseTest { 38 | 39 | @DataProvider(name = "testPlanWithPlatforms") 40 | public Object[][] createData() { 41 | return new Object[][] { { 10, "TC1" } }; 42 | } 43 | 44 | @Test(dataProvider = "testPlanWithPlatforms") 45 | public void testGetTestPlanPlatforms(Integer planId, String expectedPlatform) { 46 | this.loadXMLRPCMockData("tl.getTestPlanPlatforms.xml"); 47 | 48 | Platform[] platforms = null; 49 | 50 | try { 51 | platforms = this.api.getTestPlanPlatforms(planId); 52 | } catch (Exception e) { 53 | Assert.fail(e.getMessage(), e); 54 | } 55 | 56 | Assert.assertNotNull(platforms); 57 | 58 | Assert.assertTrue(platforms.length > 0); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testplan/TestGetTotalsForTestPlan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testplan; 25 | 26 | import java.util.Map; 27 | 28 | import org.testng.Assert; 29 | import org.testng.annotations.DataProvider; 30 | import org.testng.annotations.Test; 31 | 32 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestGetTotalsForTestPlan extends BaseTest { 39 | 40 | @DataProvider(name = "testPlanData") 41 | public Object[][] createData() { 42 | return new Object[][] { { 10 } }; 43 | } 44 | 45 | @Test(dataProvider = "testPlanData") 46 | public void testGetTotalsForTestPlan(Integer testPlanId) { 47 | this.loadXMLRPCMockData("tl.getTotalsForTestPlan.xml"); 48 | 49 | Map responseMap = null; 50 | 51 | try { 52 | responseMap = this.api.getTotalsForTestPlan(testPlanId); 53 | } catch (Exception e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(responseMap); 58 | 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testplan/TestRemovePlatformFromTestPlan.java: -------------------------------------------------------------------------------- 1 | package br.eti.kinoshita.testlinkjavaapi.testplan; 2 | 3 | import java.util.Map; 4 | 5 | import org.testng.Assert; 6 | import org.testng.annotations.DataProvider; 7 | import org.testng.annotations.Test; 8 | 9 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 10 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 11 | 12 | /** 13 | * Tests the method removePlatformFromTestPlan. 14 | * 15 | * @since 1.9.6-0 16 | */ 17 | public class TestRemovePlatformFromTestPlan extends BaseTest { 18 | 19 | @DataProvider(name = "removePlatformFromTestPlan") 20 | public Object[][] createData() { 21 | return new Object[][] { { 1, 10, "browser" } }; 22 | } 23 | 24 | @Test(dataProvider = "removePlatformFromTestPlan") 25 | public void testGetProjectPlatforms(Integer testProjectId, Integer testPlanId, String platformName) { 26 | this.loadXMLRPCMockData("tl.removePlatformFromTestPlan.xml"); 27 | Map map = null; 28 | 29 | try { 30 | map = api.removePlatformFromTestPlan(testProjectId, testPlanId, platformName); 31 | } catch (TestLinkAPIException e) { 32 | Assert.fail(e.getMessage(), e); 33 | } 34 | 35 | Assert.assertNotNull(map); 36 | 37 | Assert.assertNotNull(map.get("msg")); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testproject/TestGetProjectPlatforms.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testproject; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Platform; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | * @since 1.9.6-0 37 | */ 38 | public class TestGetProjectPlatforms extends BaseTest { 39 | 40 | @DataProvider(name = "getProjectPlatforms") 41 | public Object[][] createData() { 42 | return new Object[][] { { 1 } }; 43 | } 44 | 45 | @Test(dataProvider = "getProjectPlatforms") 46 | public void testGetProjectPlatforms(Integer projectId) { 47 | this.loadXMLRPCMockData("tl.getProjectPlatforms.xml"); 48 | Platform[] platforms = null; 49 | 50 | try { 51 | platforms = api.getProjectPlatforms(projectId); 52 | } catch (TestLinkAPIException e) { 53 | Assert.fail(e.getMessage(), e); 54 | } 55 | 56 | Assert.assertNotNull(platforms); 57 | 58 | Assert.assertTrue(platforms.length > 0); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testproject/TestGetTestProjects.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testproject; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.Test; 28 | 29 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 30 | import br.eti.kinoshita.testlinkjavaapi.model.TestProject; 31 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 32 | 33 | /** 34 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 35 | 36 | */ 37 | public class TestGetTestProjects extends BaseTest { 38 | 39 | @Test 40 | public void testGetProjects() { 41 | this.loadXMLRPCMockData("tl.getProjects.xml"); 42 | TestProject[] projects = null; 43 | 44 | try { 45 | projects = api.getProjects(); 46 | } catch (TestLinkAPIException e) { 47 | Assert.fail(e.getMessage(), e); 48 | } 49 | 50 | Assert.assertNotNull(projects); 51 | 52 | Assert.assertTrue(projects.length > 0); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testsuite/TestCreateTestSuite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testsuite; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestSuite; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestCreateTestSuite extends BaseTest { 39 | 40 | @DataProvider(name = "validTestSuite") 41 | public Object[][] createData() { 42 | return new Object[][] { { 1, "Sample test suite 2" }, { 1, "Sample test suite 3" } }; 43 | } 44 | 45 | @Test(dataProvider = "validTestSuite") 46 | public void testCreateTestSuite(Integer testProjectId, String details) { 47 | this.loadXMLRPCMockData("tl.createTestSuite.xml"); 48 | 49 | TestSuite testSuite = null; 50 | 51 | try { 52 | testSuite = api.createTestSuite(testProjectId, "Sample suite " + System.currentTimeMillis(), details, null, 53 | null, null, null); 54 | } catch (TestLinkAPIException e) { 55 | Assert.fail(e.getMessage(), e); 56 | } 57 | 58 | Assert.assertNotNull(testSuite); 59 | 60 | Assert.assertNotNull(testSuite.getName()); 61 | 62 | Assert.assertTrue(testSuite.getId() > 0); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testsuite/TestGetFirstLevelTestSuiteForTestProject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testsuite; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestSuite; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestGetFirstLevelTestSuiteForTestProject extends BaseTest { 39 | 40 | @DataProvider(name = "validTestProjects") 41 | public Object[][] createData() { 42 | return new Object[][] { { 1 } }; 43 | } 44 | 45 | @Test(dataProvider = "validTestProjects") 46 | public void testGetFirstLevelTestSuitesForTestProject(Integer testProjectId) { 47 | this.loadXMLRPCMockData("tl.createTestSuite.xml"); 48 | 49 | TestSuite[] testSuites = null; 50 | 51 | try { 52 | testSuites = api.getFirstLevelTestSuitesForTestProject(testProjectId); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(testSuites); 58 | 59 | Assert.assertTrue(testSuites.length > 0); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testsuite/TestGetFirstLevelTestSuiteForTestProjectEmptyResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testsuite; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.constants.TestLinkAPIErrors; 32 | import br.eti.kinoshita.testlinkjavaapi.model.TestSuite; 33 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 34 | 35 | /** 36 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 37 | 38 | */ 39 | public class TestGetFirstLevelTestSuiteForTestProjectEmptyResult extends BaseTest { 40 | 41 | @DataProvider(name = "validTestProjects") 42 | public Object[][] createData() { 43 | return new Object[][] { { 1 } }; 44 | } 45 | 46 | @Test(dataProvider = "validTestProjects") 47 | public void testGetFirstLevelTestSuitesForTestProject(Integer testProjectId) { 48 | this.loadXMLRPCMockData("tl.getFirstLevelTestSuitesForTestProjectEmptyResult.xml"); 49 | 50 | TestSuite[] testSuites = null; 51 | 52 | try { 53 | testSuites = api.getFirstLevelTestSuitesForTestProject(testProjectId); 54 | } catch (TestLinkAPIException e) { 55 | Assert.assertTrue(TestLinkAPIErrors.TEST_PROJECT_IS_EMPTY.isCode(e.getCode())); 56 | 57 | } 58 | 59 | Assert.assertNull(testSuites); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testsuite/TestGetTestSuiteById.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testsuite; 25 | 26 | import java.util.ArrayList; 27 | import java.util.List; 28 | 29 | import org.testng.Assert; 30 | import org.testng.annotations.DataProvider; 31 | import org.testng.annotations.Test; 32 | 33 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 34 | import br.eti.kinoshita.testlinkjavaapi.model.TestSuite; 35 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 36 | 37 | /** 38 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 39 | 40 | */ 41 | public class TestGetTestSuiteById extends BaseTest { 42 | 43 | @DataProvider(name = "validTestSuite") 44 | public Object[][] createData() { 45 | return new Object[][] { { 4 }, { 3 } }; 46 | } 47 | 48 | @Test(dataProvider = "validTestSuite") 49 | public void testGetTestSuiteById(Integer suiteId) { 50 | this.loadXMLRPCMockData("tl.getTestSuiteByID.xml"); 51 | 52 | TestSuite[] testSuites = null; 53 | 54 | List testSuiteIds = new ArrayList<>(); 55 | testSuiteIds.add(suiteId); 56 | 57 | try { 58 | testSuites = api.getTestSuiteByID(testSuiteIds); 59 | } catch (TestLinkAPIException e) { 60 | Assert.fail(e.getMessage(), e); 61 | } 62 | 63 | Assert.assertNotNull(testSuites); 64 | 65 | Assert.assertEquals(testSuites.length, 1); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testsuite/TestGetTestSuitesForTestPlan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testsuite; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestSuite; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestGetTestSuitesForTestPlan extends BaseTest { 39 | 40 | @DataProvider(name = "testPlanWithTestSuites") 41 | public Object[][] createData() { 42 | return new Object[][] { { 10 } }; 43 | } 44 | 45 | @Test(dataProvider = "testPlanWithTestSuites") 46 | public void testGetTestSuitesForTestPlan(Integer testPlanId) { 47 | this.loadXMLRPCMockData("tl.getTestSuitesForTestPlan.xml"); 48 | 49 | TestSuite[] testSuites = null; 50 | 51 | try { 52 | testSuites = api.getTestSuitesForTestPlan(testPlanId); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(testSuites); 58 | 59 | Assert.assertTrue(testSuites.length > 0); 60 | 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testsuite/TestGetTestSuitesForTestSuite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testsuite; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestSuite; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestGetTestSuitesForTestSuite extends BaseTest { 39 | 40 | @DataProvider(name = "testSuitesWithChildren") 41 | public Object[][] createData() { 42 | return new Object[][] { { 2 } }; 43 | } 44 | 45 | @Test(dataProvider = "testSuitesWithChildren") 46 | public void testGetTestSuitesForTestSuite(Integer testSuiteId) { 47 | this.loadXMLRPCMockData("tl.getTestSuitesForTestSuite.xml"); 48 | 49 | TestSuite[] testSuites = null; 50 | 51 | try { 52 | testSuites = api.getTestSuitesForTestSuite(testSuiteId); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(testSuites); 58 | 59 | Assert.assertTrue(testSuites.length > 0); 60 | 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/testsuite/TestGetTestSuitesForTestSuiteEmptyResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.testsuite; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.TestSuite; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestGetTestSuitesForTestSuiteEmptyResult extends BaseTest { 39 | 40 | @DataProvider(name = "testEmptySuites") 41 | public Object[][] createData() { 42 | return new Object[][] { { 1 } }; 43 | } 44 | 45 | @Test(dataProvider = "testEmptySuites") 46 | public void testGetTestSuitesForTestSuite(Integer testSuiteId) { 47 | this.loadXMLRPCMockData("tl.getTestSuitesForTestSuiteEmptyResult.xml"); 48 | 49 | TestSuite[] testSuites = null; 50 | 51 | try { 52 | testSuites = api.getTestSuitesForTestSuite(testSuiteId); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(testSuites); 58 | 59 | Assert.assertEquals(testSuites.length, 0); 60 | 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/upload/TestUploadAttachment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.upload; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Attachment; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestUploadAttachment extends BaseTest { 39 | 40 | @DataProvider(name = "uploadData") 41 | public Object[][] createData() { 42 | return new Object[][] { { "nodes_hierarchy", 4, "Attachment title", "Attachment description", 43 | "attachmentFileName.txt", "text/plain", "QnJ1bm8=" 44 | 45 | } }; 46 | } 47 | 48 | @Test(dataProvider = "uploadData") 49 | public void testUploadAttachment(String fkTable, Integer fkId, String title, String description, String fileName, 50 | String fileType, String content) { 51 | this.loadXMLRPCMockData("tl.uploadAttachment.xml"); 52 | Attachment attachment = null; 53 | 54 | try { 55 | attachment = this.api.uploadAttachment(fkId, fkTable, title, description, fileName, fileType, content); 56 | } catch (TestLinkAPIException e) { 57 | Assert.fail(e.getMessage(), e); 58 | } 59 | 60 | Assert.assertNotNull(attachment); 61 | 62 | // TBD: open an issue because php XMLRPC API is not returning the ID. 63 | // Assert.assertTrue( attachment.getId() > 0); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/upload/TestUploadTestCaseAttachment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.upload; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Attachment; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | 37 | */ 38 | public class TestUploadTestCaseAttachment extends BaseTest { 39 | 40 | @DataProvider(name = "testCaseAttachmentData") 41 | public Object[][] createData() { 42 | return new Object[][] { { 8, "Attachment title", "Attachment description", "attachmentFileName.txt", 43 | "text/plain", "QnJ1bm8=", 1 } }; 44 | } 45 | 46 | @Test(dataProvider = "testCaseAttachmentData") 47 | public void testUploadTestCaseAttachment(Integer testCaseId, String title, String description, String fileName, 48 | String fileType, String content, int version) { 49 | this.loadXMLRPCMockData("tl.uploadTestCaseAttachment.xml"); 50 | 51 | Attachment attachment = null; 52 | 53 | try { 54 | attachment = this.api.uploadTestCaseAttachment(testCaseId, title, description, fileName, fileType, content, version); 55 | } catch (TestLinkAPIException e) { 56 | Assert.fail(e.getMessage(), e); 57 | } 58 | 59 | Assert.assertNotNull(attachment); 60 | 61 | // TBD: open an issue because php XMLRPC API is not returning the ID. 62 | // assertTrue( attachment.getId() > 0); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/upload/TestUploadTestSuiteAttachment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.upload; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.Attachment; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Bruno P. Kinoshita - http://www.kinoshita.eti.br 36 | * @since 1.0 37 | */ 38 | public class TestUploadTestSuiteAttachment extends BaseTest { 39 | 40 | @DataProvider(name = "testSuiteAttachmentData") 41 | public Object[][] createData() { 42 | return new Object[][] { { 2, "Attachment title", "Attachment description", "attachmentFileName.txt", 43 | "text/plain", "QnJ1bm8=" } }; 44 | } 45 | 46 | @Test(dataProvider = "testSuiteAttachmentData") 47 | public void testUploadTestSuiteAttachment(Integer testSuiteId, String title, String description, String fileName, 48 | String fileType, String content) { 49 | this.loadXMLRPCMockData("tl.uploadTestSuiteAttachment.xml"); 50 | 51 | Attachment attachment = null; 52 | 53 | try { 54 | attachment = this.api.uploadTestSuiteAttachment(testSuiteId, title, description, fileName, fileType, 55 | content); 56 | } catch (TestLinkAPIException e) { 57 | Assert.fail(e.getMessage(), e); 58 | } 59 | 60 | Assert.assertNotNull(attachment); 61 | 62 | // TBD: open an issue because php XMLRPC API is not returning the ID. 63 | // assertTrue( attachment.getId() > 0); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/test/java/br/eti/kinoshita/testlinkjavaapi/user/TestGetUserByLogin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * 4 | * Copyright (c) <2010> 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package br.eti.kinoshita.testlinkjavaapi.user; 25 | 26 | import org.testng.Assert; 27 | import org.testng.annotations.DataProvider; 28 | import org.testng.annotations.Test; 29 | 30 | import br.eti.kinoshita.testlinkjavaapi.BaseTest; 31 | import br.eti.kinoshita.testlinkjavaapi.model.User; 32 | import br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException; 33 | 34 | /** 35 | * @author Radoslaw Sporny 36 | * 37 | */ 38 | public class TestGetUserByLogin extends BaseTest { 39 | 40 | @DataProvider(name = "userData") 41 | public Object[][] createData() { 42 | return new Object[][] { { "jan.kowalski" } }; 43 | } 44 | 45 | @Test(dataProvider = "userData") 46 | public void testGetUserByLogin(String login) { 47 | this.loadXMLRPCMockData("tl.getUserByLogin.xml"); 48 | 49 | User user = null; 50 | 51 | try { 52 | user = api.getUserByLogin(login); 53 | } catch (TestLinkAPIException e) { 54 | Assert.fail(e.getMessage(), e); 55 | } 56 | 57 | Assert.assertNotNull(user); 58 | 59 | Assert.assertTrue(user.getDbID() > 0); 60 | 61 | Assert.assertTrue(user.getUserApiKey().isEmpty()); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.about.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Testlink API Version: 1.0 initially written by Asiel Brumfield 7 | with contributions by TestLink development Team 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.addPlatformToTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | operationlink 8 | msglink done 9 | linkStatus0 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.addTestCaseKeyWords.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | status_ok 9 | 10 | 1 11 | 12 | 13 | 14 | validKeywords 15 | 16 | 17 | 18 | 19 | 20 | 21 | 1 22 | 23 | 24 | key 25 | 26 | Sanity 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.addTestCaseToTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | feature_id1 8 | operationaddTestCaseToTestPlan 9 | status1 10 | message 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.assignRequirements.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | operationassignRequirements 9 | status1 10 | id-1 11 | additionalInfo 12 | messageSuccess! 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.checkDevKey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 1 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.checkDevKey_invalid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | code2000 9 | message(checkDevKey) - Can not authenticate client: invalid developer key 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.createBuild.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | status1 9 | operationcreateBuild 10 | id1 11 | messageSuccess! 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.createTestCase.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | operationcreateTestCase 9 | status1 10 | id10 11 | additionalInfo 12 | id10 13 | external_id2 14 | status_ok1 15 | msgok 16 | new_name 17 | version_number1 18 | has_duplicate0 19 | tcversion_id11 20 | 21 | messageSuccess! 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.createTestCaseSteps.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | testcaseid4 8 | item 9 | versionexists 10 | tcversion_id5 11 | stepSet 12 | 13 | stepNumberIDSet 14 | 15 | feedback 16 | 17 | operationcreate 18 | step_number1 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.createTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | operationcreateTestPlan 9 | additionalInfo 10 | status1 11 | id13 12 | messageSuccess! 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.createTestProject.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | operationcreateTestProject 9 | additionalInfo 10 | status1 11 | id14 12 | messageSuccess! 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.createTestSuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id15 9 | name 10 | name_changed0 11 | status1 12 | operationcreateTestSuite 13 | additionalInfo 14 | messageok 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.deleteExecution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | status1 9 | id2 10 | messageSuccess! 11 | operationdeleteExecution 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.deleteTestCaseSteps.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | testcaseid4 8 | item 9 | versionexists 10 | stepSet 11 | 1 12 | id12 13 | step_number1 14 | actionsno actions 15 | expected_resultsanything 16 | active1 17 | execution_type1 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.doesUserExist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 1 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getBuildsForTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id1 9 | testplan_id2 10 | namebuild-1348071623545 11 | notesno notes 12 | active1 13 | is_open1 14 | release_date2019-01-14 15 | closed_on_date2019-02-27 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getExecCountersByBuild.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | raw 8 | with_tester 9 | 10 | total 11 | 12 | active_builds 13 | 2 14 | id2 15 | testplan_id2 16 | name11111 17 | notes 18 | active1 19 | is_open1 20 | release_date 21 | closed_on_date 22 | 23 | 24 | 25 | table 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getFirstLevelTestSuitesForTestProject.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id15 9 | parent_id1 10 | node_type_id2 11 | node_order0 12 | node_tabletestsuites 13 | namesuite-1348072448450 14 | 15 | 16 | id3 17 | parent_id1 18 | node_type_id2 19 | node_order1 20 | node_tabletestsuites 21 | namesuite001 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getFirstLevelTestSuitesForTestProjectEmptyResult.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | code7008 9 | message(getFirstLevelTestSuitesForTestProject) - Test Project (empty-project) is empty. 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getFullPath.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 4 8 | testlink-java-api 9 | suite001 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getLastExecutionResult.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id1 9 | build_id1 10 | tester_id1 11 | execution_ts2012-09-19 14:14:13 12 | statusp 13 | testplan_id2 14 | tcversion_id5 15 | tcversion_number1 16 | platform_id0 17 | execution_type1 18 | notes 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getLatestBuildForTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | id1 8 | testplan_id2 9 | namebuild-1348071623545 10 | notesno notes 11 | active1 12 | is_open1 13 | release_date 14 | closed_on_date 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getProjectPlatforms.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | browser 8 | id1 9 | namebrowser 10 | 11 | cell 12 | id2 13 | namecell 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getProjectTestPlans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id13 9 | nameplan-1348072269696 10 | notesno notes 11 | active1 12 | is_public1 13 | testproject_id1 14 | 15 | 16 | id2 17 | nameplan001 18 | notes 19 | active1 20 | is_public1 21 | testproject_id1 22 | 23 | 24 | id18 25 | nameplan002 26 | notes 27 | active1 28 | is_public1 29 | testproject_id1 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCase.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | updater_login 9 | author_loginadmin 10 | nametestcase001 11 | node_order100 12 | testsuite_id3 13 | testcase_id4 14 | id5 15 | tc_external_id1 16 | version1 17 | layout1 18 | status1 19 | summary 20 | preconditions 21 | importance2 22 | author_id1 23 | creation_ts2012-09-19 13:11:19 24 | updater_id 25 | modification_ts0000-00-00 00:00:00 26 | active1 27 | is_open1 28 | execution_type1 29 | author_first_nameTestlink 30 | author_last_nameAdministrator 31 | updater_first_name 32 | updater_last_name 33 | steps 34 | full_tc_external_idtja-1 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCaseAttachments.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 7 8 | id7 9 | namenothing.txt 10 | file_typetext/plain 11 | titlenothing 12 | date_added2012-09-19 15:24:49 13 | contenteW8h 14 | 15 | 2 16 | id2 17 | name1297750332397.jpeg 18 | file_typeimage/jpeg 19 | title 20 | date_added2012-09-19 14:58:50 21 | contenteW8h 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCaseBugs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | bugs 9 | 10 | bug_id1 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCaseCustomFieldDesignValue.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | abc 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCaseCustomFieldExecutionValue.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | abc 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCaseCustomFieldTestPlanDesignValue.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | id3 8 | namejava class plan 9 | labeljava class plan 10 | type0 11 | possible_values 12 | default_value 13 | valid_regexp 14 | length_min0 15 | length_max0 16 | show_on_design0 17 | enable_on_design0 18 | show_on_execution0 19 | enable_on_execution0 20 | show_on_testplan_design1 21 | enable_on_testplan_design1 22 | display_order1 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCaseIDByName.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id4 9 | nametestcase001 10 | parent_id3 11 | tsuite_namesuite001 12 | tc_external_id1 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCaseKeywords.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | keyword 12 | 13 | 1 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCasesForTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 4 8 | 9 | tcase_id4 10 | tc_id4 11 | tcversion_id5 12 | version1 13 | external_id1 14 | execution_type1 15 | feature_id1 16 | platform_id0 17 | platform_name 18 | execution_order1 19 | exec_statusn 20 | full_external_idtja-1 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCasesForTestPlanEmptyResult.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCasesForTestPlanWithExecutionStatus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 3 8 | 9 | tcase_id3 10 | tc_id3 11 | tcversion_id4 12 | version1 13 | external_id1 14 | execution_type2 15 | feature_id1 16 | platform_id0 17 | platform_name 18 | execution_order1000 19 | exec_statusp 20 | full_external_idp-1 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCasesForTestSuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id10 9 | parent_id3 10 | node_type_id3 11 | node_order0 12 | node_tabletestcases 13 | nametc1348071707753 14 | external_idtja-2 15 | 16 | 17 | id4 18 | parent_id3 19 | node_type_id3 20 | node_order100 21 | node_tabletestcases 22 | nametestcase001 23 | external_idtja-1 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestCasesForTestSuiteEmptyResult.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestPlanByName.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id2 9 | testproject_id1 10 | notes 11 | active1 12 | is_open1 13 | is_public1 14 | nameplan001 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestPlanPlatforms.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | id1 9 | nameplatform001 10 | notes 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestProjectByName.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | id2 8 | notes 9 | color 10 | active1 11 | option_reqs0 12 | option_priority0 13 | option_automation0 14 | optionsO:8:"stdClass":4:{s:19:"requirementsEnabled";i:1;s:19:"testPriorityEnabled";i:1;s:17:"automationEnabled";i:1;s:16:"inventoryEnabled";i:1;} 15 | prefixsp 16 | tc_counter0 17 | is_public1 18 | issue_tracker_enabled0 19 | reqmgr_integration_enabled0 20 | nameSample project 21 | opt 22 | requirementsEnabled1 23 | testPriorityEnabled1 24 | automationEnabled1 25 | inventoryEnabled1 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestProjectByName_nonexistent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | code7011 9 | message(getTestProjectByName) - Test Project (name:testlink-java-api2) does not exist. 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestSuiteByID.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | id3 8 | details 9 | namesuite001 10 | node_type_id2 11 | node_order1 12 | parent_id1 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestSuitesForTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | namesuite001 9 | id3 10 | parent_id1 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestSuitesForTestSuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 16 8 | id16 9 | details 10 | namesuite001-001 11 | node_type_id2 12 | node_order101 13 | parent_id3 14 | 15 | 17 16 | id17 17 | details 18 | namesuite001-002 19 | node_type_id2 20 | node_order102 21 | parent_id3 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTestSuitesForTestSuiteEmptyResult.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.getTotalsForTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | with_tester 8 | 9 | n 10 | platform_id0 11 | statusn 12 | exec_qty1 13 | 14 | p 15 | platform_id0 16 | statusp 17 | exec_qty0 18 | 19 | f 20 | platform_id0 21 | statusf 22 | exec_qty0 23 | 24 | b 25 | platform_id0 26 | statusb 27 | exec_qty0 28 | 29 | 30 | 31 | total 32 | 33 | qty1 34 | platform_id0 35 | 36 | 37 | platforms 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.ping.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Hello! 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.removePlatformFromTestPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | operationunlink 8 | msgunlink done 9 | linkStatus1 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.repeat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | You said: B 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.reportTCResult.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | status1 9 | operationreportTCResult 10 | overwrite1 11 | messageSuccess! 12 | id1 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.sayHello.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Hello! 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.setTestCaseExecutionResult.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | status1 9 | operationreportTCResult 10 | overwrite1 11 | messageSuccess! 12 | id1 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.setTestCaseExecutionType.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | testprojectid1 9 | executiontype2 10 | devKeyf3230e0850876097abdfef4e3cd01145 11 | testcaseid4 12 | version1 13 | 14 | 15 | 2 16 | 2 17 | /* Class:testcase - Method: setExecutionType */ UPDATE tcversions SET execution_type=2 WHERE id = 5 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.setTestMode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 1 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.updateBuildCustomFields.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | buildid2 9 | testplanid3 10 | testprojectid1 11 | devKeyf3230e0850876097abdfef4e3cd01145 12 | 13 | 14 | 2 15 | 2 16 | /* Class:testcase - Method: setExecutionType */ UPDATE tcversions SET execution_type=2 WHERE id = 5 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.uploadAttachment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | fk_id8 8 | fk_tablerequirements 9 | titlenothing 10 | descriptionnothing 11 | file_namenothing.txt 12 | file_size3 13 | file_typetext/plain 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.uploadExecutionAttachment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | fk_id3 8 | fk_tableexecutions 9 | titlenothing 10 | descriptionnothing 11 | file_namenothing.txt 12 | file_size3 13 | file_typetext/plain 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.uploadRequirementAttachment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | fk_id8 8 | fk_tablerequirements 9 | titlenothing 10 | descriptionnothing 11 | file_namenothing.txt 12 | file_size3 13 | file_typetext/plain 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.uploadRequirementSpecificationAttachment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | fk_id6 8 | fk_tablereq_specs 9 | titlenothing 10 | descriptionnothing 11 | file_namenothing.txt 12 | file_size3 13 | file_typetext/plain 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.uploadTestCaseAttachment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | fk_id4 8 | fk_tablenodes_hierarchy 9 | titlenothing 10 | descriptionnothing 11 | file_namenothing.txt 12 | file_size3 13 | file_typetext/plain 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.uploadTestProjectAttachment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | fk_id1 8 | fk_tablenodes_hierarchy 9 | titlenothing 10 | descriptionnothing 11 | file_namenothing.txt 12 | file_size3 13 | file_typetext/plain 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/br/eti/kinoshita/testlinkjavaapi/testdata/tl.uploadTestSuiteAttachment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | fk_id3 8 | fk_tablenodes_hierarchy 9 | titlenothing 10 | descriptionnothing 11 | file_namenothing.txt 12 | file_size3 13 | file_typetext/plain 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/testlinkjavaapi.properties: -------------------------------------------------------------------------------- 1 | 2 | #xmlrpc.basicEncoding= 3 | #xmlrpc.basicPassword= 4 | #xmlrpc.basicUsername= 5 | #xmlrpc.connectionTimeout= 6 | #xmlrpc.contentLengthOptional= 7 | #xmlrpc.enabledForExceptions= 8 | #xmlrpc.encoding= 9 | #xmlrpc.gzipCompression= 10 | #xmlrpc.gzipRequesting= 11 | #xmlrpc.replyTimeout= 12 | #xmlrpc.userAgent= 13 | --------------------------------------------------------------------------------