Coder Social home page Coder Social logo

Comments (2)

kinow avatar kinow commented on June 1, 2024

Hi @davidrova , feel free to submit a pull request with the proposal fix :-) I'll start a dev cycle on testlink-java-api and will try to fix as many issues as possible to release a new version that works with the latest version of testlink. Cheers, Bruno.

from testlink-java-api.

kinow avatar kinow commented on June 1, 2024

HI @davidrova ,

Spent some minutes reviewing your code and looking for what was different. It looks to me what you changed was:

        testCases = new TestCase[testCasesList.size()];
        for (int i = 0 ; i <  testCasesList.size() ; i++ ){
            testCases[i] = testCasesList.get(i);
        }

But as far as I know, that is equivalent to

    testCases = testCasesList.toArray(new TestCase[0]);

We are not getting just one element here. But telling toArray what is the object type it needs to create. Probably cause that method predates generics in Java I think.

Not sure if I missed your point here. If so, sorry. And feel free to re-open the ticket with more information.

Also tested the method you mentioned, looking for issues with platform. I have added two platforms, then assigned two test cases to a test plan. Everything appears to work OK with the following code:

        TestCase[] testcases = api.getTestCasesForTestPlan(testPlanId, null, null, null, null, null, null, null, null, null, null);
        for (TestCase testcase : testcases) {
            System.out.println(testcase);
        }

Which gives me:

TestCase [id=3, name=Test Case 1, testSuiteId=null, testProjectId=null, authorLogin=null, summary=null, steps=[], preconditions=null, testCaseStatus=7, testImportance=null, executionType=1, executionOrder=10000, order=null, internalId=null, fullExternalId=p1-1, checkDuplicatedName=null, actionOnDuplicatedName=null, versionId=4, version=1, parentId=null, customFields=[], executionStatus=n, platform=Platform [id=1, name=Platform 1, notes=null], featureId=2, keywords= null]
TestCase [id=3, name=Test Case 1, testSuiteId=null, testProjectId=null, authorLogin=null, summary=null, steps=[], preconditions=null, testCaseStatus=7, testImportance=null, executionType=1, executionOrder=10000, order=null, internalId=null, fullExternalId=p1-1, checkDuplicatedName=null, actionOnDuplicatedName=null, versionId=4, version=1, parentId=null, customFields=[], executionStatus=n, platform=Platform [id=2, name=Platform 2, notes=null], featureId=3, keywords= null]

from testlink-java-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.