Examples of TestProject


Examples of br.eti.kinoshita.testlinkjavaapi.model.TestProject

      Object[] responseArray = (Object[])response;
      projects = new TestProject[responseArray.length];
      for (int i = 0; i < responseArray.length; i++)
      {
        Map<String, Object> projectMap = (Map<String, Object>)responseArray[i];
        TestProject testProject = Util.getTestProject(projectMap);
        projects[i] = testProject;
      }
     
    }
    catch ( XmlRpcException xmlrpcex )
View Full Code Here

Examples of br.eti.kinoshita.testlinkjavaapi.model.TestProject

   * @return Test Project.
   */
  @SuppressWarnings("unchecked")
  public static final TestProject getTestProject(Map<String, Object> map)
  {
    TestProject testProject = null;
    if ( map != null && map.size() > 0 )
    {
      Object o = map.get( TestLinkResponseParams.id.toString());
      if ( o != null )
      {
        Integer id = Integer.parseInt( o.toString() );
       
        if ( id > 0 )
        {
          testProject = new TestProject();
          testProject.setId( id );
         
          testProject.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testProject.setPrefix( getString(map, TestLinkResponseParams.prefix.toString() ) );
          testProject.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          Map<String, Object> optMap = (Map<String, Object>)map.get(TestLinkResponseParams.opt.toString());
          testProject.setEnableAutomation( getBoolean(optMap, TestLinkResponseParams.automationEnabled.toString()));
          testProject.setEnableRequirements( getBoolean(optMap, TestLinkResponseParams.requirementsEnabled.toString()));
          testProject.setEnableTestPriority( getBoolean(optMap, TestLinkResponseParams.testPriorityEnabled.toString()));
          testProject.setEnableInventory( getBoolean(optMap, TestLinkResponseParams.inventoryEnabled.toString()));
         
          testProject.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testProject.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testProject;
View Full Code Here

Examples of com.testlink.api.domain.TestProject

    public static void main(String args[]) {

        try {
            TestLinkAPIClient client = new TestLinkAPIClient("http://demo.testlink.org/latest/lib/api/xmlrpc/v1/xmlrpc.php", "4f4c8d5e2bc5b573556b89d0db9b34e6");
            TestProject project = client.getTestProjectByName("ctftest");
            client.createTestSuite(project.getId(), "artf102345", "created from API");
        } catch (TestLinkAPIException e) {
            e.printStackTrace();
        }
        //System.out.println(client.testMiscService.about());
    }
View Full Code Here

Examples of com.testlink.api.domain.TestProject

        super(xmlRpcClient, devKey);
    }

    public TestProject getTestProjectByName(String projectName)
            throws TestLinkAPIException {
        TestProject testProject = null;

        try {
            Map<String, Object> executionData = new HashMap<String, Object>();
            executionData.put(Params.TEST_PROJECT_NAME.toString(), projectName);
            Object response = this.executeXmlRpcCall(
View Full Code Here

Examples of com.testlink.api.domain.TestProject

     * @return Created Test Project object.
     */
    public TestProject createTestProject(String testProjectName,
                                            String testProjectPrefix, String notes)
            throws TestLinkAPIException {
        TestProject testProject = null;

        Integer id = 0;

        testProject = new TestProject(id, testProjectName, notes, testProjectPrefix);

        try {
            Map<String, Object> executionData = getTestProjectMap(testProject);
            Object response = this.executeXmlRpcCall(
                    Methods.CREATE_TEST_PROJECT.toString(), executionData);
            Object[] responseArray = TestLinkHelper.castToArray(response);
            Map<String, Object> responseMap = (Map<String, Object>) responseArray[0];

            id = TestLinkHelper.getInteger(responseMap, Params.ID.toString());
            testProject.setId(id);
        } catch (XmlRpcException xmlrpcex) {
            throw new TestLinkAPIException("Error creating test project: "
                    + xmlrpcex.getMessage(), xmlrpcex);
        }

View Full Code Here

Examples of com.testlink.api.domain.TestProject

     * @param map Map with properties of a Test Project.
     * @return Test Project.
     */
    @SuppressWarnings("unchecked")
    private TestProject getTestProject(Map<String, Object> map) {
        TestProject testProject = null;
        if (map != null && map.size() > 0) {
            Object o = map.get(Params.ID.toString());
            if (o != null) {
                Integer id = Integer.parseInt(o.toString());

                if (id > 0) {
                    testProject = new TestProject();
                    testProject.setId(id);

                    testProject.setName(TestLinkHelper.getString(map, Params.NAME.toString()));
                }
            }
        }
        return testProject;
    }
View Full Code Here

Examples of com.testlink.api.domain.TestProject

   private String getTargetId(String artifactId) {
        String suiteId = null;
        try {
            TestLinkAPIClient client = new TestLinkAPIClient(testLinkServiceEndpoint, testLinkApiKey);
            TestProject project = client.getTestProjectByName("ctftest");
            TestSuite suite = client.createTestSuite(project.getId(), artifactId, "created from API");
            suiteId = suite.getId().toString();
        } catch (TestLinkAPIException e) {
            System.out.println(e.getMessage());
            log.info(e.getMessage());
        } catch (Exception e) {
View Full Code Here

Examples of org.eclipse.contribution.junit.javadoc.test.TestProject

import org.eclipse.jdt.core.IType;

public final class CreateTestProjectUtil {
 
  public static TestProject createTestProject() throws CoreException, MalformedURLException, IOException{
    final TestProject project = new TestProject();
    project.addJar("org.junit", "junit.jar");
    return project;
  }
View Full Code Here

Examples of org.eclipse.egit.core.test.TestProject

    assertEquals("/bin/\n", content);
  }

  @Test
  public void testWithNestedProjects() throws Exception {
    TestProject nested = new TestProject(true, "Project-1/Project-2");
    try {
      // Use Project-1 to create folder, Project-2 to get file to try to
      // confuse any caches in workspace root (location -> IResource).
      project.createFolder("Project-2/please");
      IFile ignoreme = nested.createFile("please/ignoreme", new byte[0]);
      IgnoreOperation operation = executeIgnore(ignoreme.getLocation());
      String content = nested.getFileContent("please/.gitignore");
      assertEquals("/ignoreme\n", content);
      assertFalse(operation.isGitignoreOutsideWSChanged());
    } finally {
      nested.dispose();
    }
  }
View Full Code Here

Examples of org.eclipse.egit.core.test.TestProject

    SystemReader.setInstance(null);
  }

  private TestProject initRepoInsideProjectInsideWorkspace() throws IOException,
      CoreException {
    TestProject project = new TestProject(true, "Project-1", true, workspaceSupplement);
    File gitDir = new File(project.getProject().getLocationURI().getPath(),
        Constants.DOT_GIT);
    testDirs.add(gitDir);
    testRepository = new TestRepository(gitDir);
    repository = testRepository.getRepository();
    testRepository.connect(project.getProject());
    registerWorkspaceRelativeTestDir("Project-1");
    return project;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.