Inflectra Customer Forums: Getting all SpiraTeam project testcases using WebServices (Thread) A. I am new to webservice development. B. Does someone have an example on how I can use Webservices to get all of a projects test cases in the order they are listed in the project and get all the relevant test case/test step data including values from custom text and list boxes? Thanks. en-US(C) Copyright 2006-2024 Inflectra Corporation.support@inflectra.com/Computers/Software/Project_Management//Computers/Software/Quality_Assurance/KronoDesksupport@inflectra.comhttp://www.inflectra.com/kronodesk/forums/threads120/Support/Forum/spirateam/issues-questions/90.aspxthreadId=90Margaret D Thomas (mtha@amfpension.se)Getting all SpiraTeam project testcases using WebServices A. I am new to webservice development. B. Does someone have an example on how I can use Webservices to get all of a projects test cases in the order they are listed in the project and get all the relevant test case/test step data including values from custom text and list boxes? Thanks. Thu, 09 Jun 2011 08:56:45 -04002022-11-05T18:31:52-04:00/Support/Forum/spirateam/issues-questions/90.aspxmessageId=173David J (support1@inflectra.com) //Now lets test that we can retrieve a generic list of test cases and test runs from the s //Now lets test that we can retrieve a generic list of test cases and test runs from the sample project spiraImportExport.Connection_Authenticate( "fredbloggs" , "fredbloggs" ); spiraImportExport.Connection_ConnectToProject(1); List remoteFilters = new List (); RemoteFilter remoteFilter = new RemoteFilter (); remoteFilter.PropertyName = "OwnerId" ; remoteFilter.MultiValue = new MultiValueFilter (); remoteFilter.MultiValue.Values = new int [] { 2, 3 }; remoteFilters.Add(remoteFilter); remoteFilter = new RemoteFilter (); remoteFilter.PropertyName = "ActiveYn" ; remoteFilter.StringValue = "Y" ; remoteFilters.Add(remoteFilter); remoteFilter = new RemoteFilter (); remoteFilter.PropertyName = "ExecutionDate" ; remoteFilter.DateRangeValue = new DateRange (); remoteFilter.DateRangeValue.StartDate = DateTime .Parse( "12/1/2003" ); remoteFilter.DateRangeValue.EndDate = DateTime .Parse( "12/31/2003" ); remoteFilters.Add(remoteFilter); RemoteTestCase [] remoteTestCases = spiraImportExport.TestCase_Retrieve(remoteFilters.ToArray(), 1, 999999); Thu, 09 Jun 2011 16:17:40 -04002011-06-09T16:17:40-04:00/Support/Forum/spirateam/issues-questions/90.aspx#reply173messageId=174David J (support1@inflectra.com) //Retrieve the first test case with its steps RemoteTestCase remoteTestC //Retrieve the first test case with its steps RemoteTestCase remoteTestCase = spiraImportExport.TestCase_RetrieveById(testCaseId3); Assert .AreEqual( "Test Case 3" , remoteTestCase.Name); RemoteTestStep [] remoteTestSteps = remoteTestCase.TestSteps; Assert .AreEqual(2, remoteTestSteps.Length, "Test Step Count 1" ); Assert .AreEqual( "Test Step 1" , remoteTestSteps[0].Description); Assert .AreEqual(1, remoteTestSteps[0].Position, "Position 1" ); Assert .AreEqual( "Test Step 2" , remoteTestSteps[1].Description); Assert .AreEqual(2, remoteTestSteps[1].Position, "Position 2" ); Thu, 09 Jun 2011 16:18:50 -04002011-06-09T16:18:50-04:00/Support/Forum/spirateam/issues-questions/90.aspx#reply174messageId=176Margaret D Thomas (mtha@amfpension.se) Thank you! I am trying it now. I have now gotten past the "Object reference..." error with the sa Thank you! I am trying it now. I have now gotten past the "Object reference..." error with the sample code you provided but it is returning 0 test cases. However, it appears you have wrote the sample code in .Net and I needed to converted to Java 1.6 which I am writing in IntelliJ :). So I will play with it from here. I have a suspicion it is the dates that are not correct. With this coding method here are some notes to share: a. The RemoteFilters array must be defined and initialized as RemoteFilter[] remoteFilter = new RemoteFilter[5] or else testCase_Retrieve will not accet the remoteFilter paramter. b. With this version, the properties are treated as get and set value methods. c. Setting the date range for RemoteFilters uses a calendar type parameter, not date. Just a note for those who might be doing this in Java. Thanks. Fri, 10 Jun 2011 12:28:47 -04002011-06-10T12:28:47-04:00/Support/Forum/spirateam/issues-questions/90.aspx#reply176messageId=177Margaret D Thomas (mtha@amfpension.se) Where can one find a list of the property names to use with RemoteFilters? Where can one find a list of the property names to use with RemoteFilters? Fri, 10 Jun 2011 12:32:17 -04002011-06-10T12:32:17-04:00/Support/Forum/spirateam/issues-questions/90.aspx#reply177messageId=178Margaret D Thomas (mtha@amfpension.se) I got it! If there is an interest I can post an example of how to code it using Java and Intelli I got it! If there is an interest I can post an example of how to code it using Java and IntelliJ. Fri, 10 Jun 2011 13:19:07 -04002011-06-10T13:19:07-04:00/Support/Forum/spirateam/issues-questions/90.aspx#reply178messageId=227Daisy Dai (dxiaohong@smithmicro.com)I go over the https://www.inflectra.com/SpiraTeam/Downloads.aspx , and cannot find the library whicI go over the https://www.inflectra.com/SpiraTeam/Downloads.aspx , and cannot find the library which can be added in my IDE. Where can I found it(the jar file)? Thu, 21 Jul 2011 13:55:20 -04002011-07-21T13:55:20-04:00/Support/Forum/spirateam/issues-questions/90.aspx#reply227messageId=3180Enrico Ariatta (enrico.ariatta@assioma.net) Hello, a code example will be appreciated :) thank you Hello, a code example will be appreciated :) thank you Wed, 06 Dec 2017 16:38:39 -05002017-12-06T16:38:39-05:00/Support/Forum/spirateam/issues-questions/90.aspx#reply3180