Public Sub SetupReleaseCycles() ' Set up release cycles ' Create a Release with cycles: 'a. Create a Release folder 'b. Create a release 'c. Set release start date\end date for now and ' 3 months from now. 'd. Create 3 cycles, each one month long 'e. Use IReleaseManagementInfo to retrieve information Dim oReleaseFolderFactory As IReleaseFolderFactory Dim relFolder As ReleaseFolder Dim rootReleaseFolder As ReleaseFolder Dim relFac As IReleaseFactory Dim rel As Release Dim cyclFac As ICycleFactory Dim cycle As cycle Dim managementinfo As ReleaseManagementInfo ' Create a Release folder. Set oReleaseFolderFactory = tdc.ReleaseFolderFactory Set rootReleaseFolder = oReleaseFolderFactory.Root Set oReleaseFolderFactory = rootReleaseFolder.ReleaseFolderFactory Set relFolder = oReleaseFolderFactory.AddItem(Null) relFolder.Name = "Release Folder 1" relFolder.Post ' Create a release with a due ' date 90 days from now. Set relFac = relFolder.ReleaseFactory Set rel = relFac.AddItem(Null) rel.Name = "Release 1" rel.StartDate = DateTime.Now rel.EndDate = DateTime.Now + 90 rel.Post ' Divide the release into ' 3 development cycles of ' of one month each. Set cyclFac = rel.CycleFactory Set cycle = cyclFac.AddItem(Null) cycle.Name = "Cycle 1" cycle.StartDate = DateTime.Now cycle.EndDate = DateTime.Now + 30 cycle.Post Set cycle = cyclFac.AddItem(Null) cycle.Name = "Cycle 2" cycle.StartDate = DateTime.Now + 31 cycle.EndDate = DateTime.Now + 60 cycle.Post Set cycle = cyclFac.AddItem(Null) cycle.Name = "Cycle 3" cycle.StartDate = DateTime.Now + 61 cycle.EndDate = DateTime.Now + 90 cycle.Post ' Use IReleaseManagementInfo to retrieve information. Set managementinfo = rel.ReleaseManagementInfo Debug.Print "Days left for release: " & managementinfo.DaysLeft Debug.Print "Duration of the release is: " & managementinfo.Duration Debug.Print "Has release started? " & managementinfo.Started Debug.Print "Total test instances in release: " & _ managementinfo.TotalTestInstances Debug.Print "Unexecuted test instances in release: " & _ managementinfo.UnexecutedTestInstances Debug.Print "Days left in cycle: " & cycle.DaysLeft End Sub