locked
creating test cases in existing Test Suites of a project Visual Studio Test Manager 2013 using TFS SDK for Java RRS feed

  • Question

  • Hi,

    I am using Visual Studio Test Professional 2013.

    I was successfully able to create test cases under my project using TFS SDK for Java.

    I created test plan and test suites manually under my project(As TFS Java SDK does not support to create Test plan and Test suites) And later I want to move/add test cases to the created test suites.

    Can you please tell me Is there any way I can move/add Test cases in existing Test Suites under project using TFS SDK for Java?

    Thanks In Advance

    Rajesh

    Tuesday, March 25, 2014 3:51 PM

Answers

  • Hi Rajesh,

    CoreReferenceFieldNames.TeamProject is a constant, it is not the name of the field. your query should look something like this:

    String wiqlQuery = "Select ID, Title from WorkItems WHERE"+ CoreReferenceFieldNames.TeamProject+" = "'Testing2'";

    Please let me know if that did not resolve your problem.

    Thanks

    Mireille

    Wednesday, April 9, 2014 2:12 PM
    Moderator
  • Thank You Mireille, It solved my problem. Thanks alot.
    • Marked as answer by Rajesh_TFS Wednesday, February 25, 2015 10:24 AM
    Thursday, April 10, 2014 6:51 AM

All replies

  • Hi Rajesh,

    This is not supported by the Java SDK, sorry for the inconvenience.

    Thanks

    Mireille

    Wednesday, March 26, 2014 2:06 PM
    Moderator
  • Hi Mireille,

    Thank you for reply,

    Java SDK not support to create test suites and plans. That's why i created  test suites and plans manually in TFS.

    Can't i add test cases to existing test plans. This is a requirement for us.

    And one more question is using RunWorkItemQuery class from sdk samples snippets i have tried below query to get test cases

    "Select ID, Title from WorkItems WHERE Title CONTAINS ' xxx'"

    its giving all test cases from various project in tfs. i want test cases from only specific project ,not from all projects.

    Can you please help me to solve the problems?

    Thanks In Advance,

    Rajesh





    • Edited by Rajesh_TFS Thursday, March 27, 2014 10:19 AM
    Thursday, March 27, 2014 9:57 AM
  • Hi Rajesh,

    Still you can't add test cases to a test plan using the java sdk.

    as for the query to filter by a certain team project you can add this condition to your where clause

    CoreReferenceFieldNames.TeamProject='MyTeamProject'.

    Please let me know if you have any other questions/issues.

    Thanks

    Mireille

    Monday, March 31, 2014 4:26 PM
    Moderator
  • Hi Mireille,

    Thank you for Reply.

    when i have added this below in where clause CoreReferenceFieldNames.TEAM_PROJECT='MyTeamProject' i am getting exception below.

    Exception in thread "main" java.lang.RuntimeException: The query references a field 'CoreFieldReferenceNames.TEAM_PROJECT' (prefix 'null') that does not exist.

    even i   tried with CoreReferenceFieldNames.TeamProject also

    String wiqlQuery = "Select ID, Title from WorkItems WHERE CoreReferenceFieldNames.TeamProject = 'Testing2'";

    but getting same exception.

    can you provide sample code snippets.

    can you help me to fix this?

    Thanks,

    Rajesh


    • Edited by Rajesh_TFS Thursday, April 3, 2014 9:55 AM
    Thursday, April 3, 2014 9:35 AM
  • Hi Rajesh,

    CoreReferenceFieldNames.TeamProject is a constant, it is not the name of the field. your query should look something like this:

    String wiqlQuery = "Select ID, Title from WorkItems WHERE"+ CoreReferenceFieldNames.TeamProject+" = "'Testing2'";

    Please let me know if that did not resolve your problem.

    Thanks

    Mireille

    Wednesday, April 9, 2014 2:12 PM
    Moderator
  • Thank You Mireille, It solved my problem. Thanks alot.
    • Marked as answer by Rajesh_TFS Wednesday, February 25, 2015 10:24 AM
    Thursday, April 10, 2014 6:51 AM
  • Glad it worked.

    Please let me know if you have any other questions/issues

    Thanks

    Mireille

    • Marked as answer by Rajesh_TFS Wednesday, February 25, 2015 10:24 AM
    • Unmarked as answer by Rajesh_TFS Wednesday, February 25, 2015 10:24 AM
    Thursday, April 10, 2014 2:22 PM
    Moderator