/// <summary>
 /// Assign Cycle to test lab folder
 /// <para/> returns true if successfull
 /// </summary>
 /// <param name="testLabFolderPath">testplan folder path</param>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <returns>true if successfull</returns>
 public Boolean AssignCycle(String testLabFolderPath, TDAPIOLELib.Cycle cycle)
 {
     return(AssignCycle(GetTestSetFolder(testLabFolderPath), cycle));
     //TDAPIOLELib.TestSetFolder testSetFolder = GetTestSetFolder(testLabFolderPath);
     //testSetFolder.TargetCycle = cycle.ID;
     //return true;
 }
示例#2
0
        /// <summary>
        /// Update Cycle Field value
        /// </summary>
        /// <param name="cycle"></param>
        /// <param name="fieldName"></param>
        /// <param name="newValue"></param>
        /// <param name="Post"></param>
        /// <returns></returns>
        public Boolean UpdateFieldValue(TDAPIOLELib.Cycle cycle, String fieldName, String newValue, Boolean Post = true)
        {
            cycle[fieldName.ToUpper()] = newValue;

            if (Post)
            {
                cycle.Post();
            }

            return(true);
        }
示例#3
0
        /// <summary>
        /// Creates a cycle inside release
        /// <Para/>returns TDAPIOLELib.Cycle Object
        /// </summary>
        /// <param name="cycleName">Name of Cycle</param>
        /// <param name="startDate">Cycle Start Date</param>
        /// <param name="endDate">Cycle End Date</param>
        /// <param name="release">Release under which Cycle Should be created</param>
        /// <param name="post">Post this Cycle</param>
        /// <returns>TDAPIOLELib.Cycle Object</returns>
        public TDAPIOLELib.Cycle Create(String cycleName, DateTime startDate, DateTime endDate, TDAPIOLELib.Release release, Boolean post = true)
        {
            TDAPIOLELib.CycleFactory cycleFactory = release.CycleFactory;
            TDAPIOLELib.Cycle        cycle        = cycleFactory.AddItem(System.DBNull.Value);

            cycle.Name      = cycleName;
            cycle.EndDate   = endDate;
            cycle.StartDate = startDate;

            if (post)
            {
                cycle.Post();
            }

            return(cycle);
        }
示例#4
0
        public void Verify_Cycles()
        {
            Dictionary <String, String> releaseDetails = new Dictionary <string, string>();

            TDAPIOLELib.ReleaseFolder releaseFolder = aLM_CORE.Releases.ReleaseFolders.Create("Releases", "Dummy1");
            releaseDetails.Add("REL_NAME", "Release1");
            releaseDetails.Add("REL_START_DATE", DateTime.Now.ToShortDateString());
            releaseDetails.Add("REL_END_DATE", DateTime.Now.AddDays(10).ToShortDateString());
            TDAPIOLELib.Release release = aLM_CORE.Releases.Release.Create(releaseDetails, aLM_CORE.Releases.ReleaseFolders.GetPath(releaseFolder));

            TDAPIOLELib.Cycle cycle = aLM_CORE.Releases.Cycle.Create("Cycle1", release.StartDate, release.EndDate, release);

            List <String> Attach = new List <String>();

            Attach.Add("C:\\Temp\\ALMUPLOAD\\DOC1.txt");
            Attach.Add("C:\\Temp\\ALMUPLOAD\\DOC2.docx");
            Attach.Add("C:\\Temp\\ALMUPLOAD\\DOC3.xlsx");

            aLM_CORE.Releases.Cycle.AddAttachment(cycle, Attach);

            aLM_CORE.Releases.Cycle.DownloadAttachments(cycle, "C:\\Temp\\ALMDOWNLOAD");

            aLM_CORE.Releases.Cycle.DeleteAttachmentByName(cycle, "DOC1.txt");
            aLM_CORE.Releases.Cycle.DeleteAllAttachments(cycle);

            TDAPIOLELib.Recordset ORec = aLM_CORE.Releases.Cycle.GetAllDetails(cycle);
            for (int i = 0; i < ORec.RecordCount; i++)
            {
                for (int j = 0; j < ORec.ColCount; j++)
                {
                    Console.WriteLine(ORec.ColName[j] + "--" + ORec[j]);
                }
                ORec.Next();
            }

            release = aLM_CORE.Releases.Cycle.GetRelease(cycle);
            Console.WriteLine(release.Name);

            aLM_CORE.Releases.Cycle.Delete(cycle);
            aLM_CORE.Releases.Release.Delete(release);
            aLM_CORE.Releases.ReleaseFolders.Delete("Releases", "Dummy1");
        }
示例#5
0
 /// <summary>
 /// Get All Cycle Field Values. This Function uses TDAPIOLELib.Recordset, So You must have access in ALM to run queries
 /// <para>returns TDAPIOLELib.Recordset Object</para>
 /// </summary>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <returns>TDAPIOLELib.Recordset Object</returns>
 public TDAPIOLELib.Recordset GetAllDetails(TDAPIOLELib.Cycle cycle)
 {
     return(Utilities.ExecuteQuery("Select * from RELEASE_CYCLES where RCYC_ID = " + cycle.ID, tDConnection));
 }
示例#6
0
 /// <summary>
 /// Finds Release for a Cycle
 /// <para>returns TDAPIOLELib.Release Object</para>
 /// </summary>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <returns>TDAPIOLELib.Release Object</returns>
 public TDAPIOLELib.Release GetRelease(TDAPIOLELib.Cycle cycle)
 {
     return(cycle.Parent);
 }
示例#7
0
 /// <summary>
 /// Delete Cycle
 /// <para/> True if successfull
 /// </summary>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <returns>True if successfull</returns>
 public Boolean Delete(TDAPIOLELib.Cycle cycle)
 {
     TDAPIOLELib.CycleFactory cycleFactory = tDConnection.CycleFactory;
     cycleFactory.RemoveItem(cycle.ID);
     return(true);
 }
示例#8
0
 /// <summary>
 /// Delete attachment by name
 /// <para>returns true if successfull</para>
 /// </summary>
 /// <param name="cycle"></param>
 /// <param name="attachmentName"></param>
 /// <returns>true if successfull</returns>
 public Boolean DeleteAttachmentByName(TDAPIOLELib.Cycle cycle, String attachmentName)
 {
     return(Utilities.DeleteAttachmentByName(cycle.Attachments, attachmentName));
 }
示例#9
0
 /// <summary>
 /// Delete all Cycle attachments
 /// <para>returns true if successfull</para>
 /// </summary>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <returns>true if successfull</returns>
 public Boolean DeleteAllAttachments(TDAPIOLELib.Cycle cycle)
 {
     return(Utilities.DeleteAllAttachments(cycle.Attachments));
 }
示例#10
0
 /// <summary>
 /// Add attachments to Cycle
 /// <para>returns true if successfull</para>
 /// </summary>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <param name="attachmentsPath">List of attachment path</param>
 /// <returns>True if successfull</returns>
 public Boolean AddAttachment(TDAPIOLELib.Cycle cycle, List <String> attachmentsPath)
 {
     return(Utilities.AddAttachment(cycle.Attachments, attachmentsPath));
 }
示例#11
0
 /// <summary>
 /// Download Cycle Attachments
 /// <para>returns true if successfull</para>
 /// </summary>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <param name="attachmentDownloadPath">attachments download path</param>
 /// <returns>True if successfull</returns>
 public Boolean DownloadAttachments(TDAPIOLELib.Cycle cycle, String attachmentDownloadPath)
 {
     return(Utilities.DownloadAttachments(cycle.Attachments, attachmentDownloadPath));
 }
 /// <summary>
 /// Assign Cycle to test lab folder
 /// <para/> returns true if successfull
 /// </summary>
 /// <param name="testSetFolder">TDAPIOLELib.TestSetFolder Object</param>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <returns>true if successfull</returns>
 public Boolean AssignCycle(TDAPIOLELib.TestSetFolder testSetFolder, TDAPIOLELib.Cycle cycle)
 {
     testSetFolder.TargetCycle = cycle.ID;
     return(true);
 }