locked
How to get Test project Result output directory path in custom data collector RRS feed

  • Question


  • I wrote the custom data collector . I would like to have the output directory path. is it possible to get path folder in OnTestCaseStart event ?

    private DataCollectionEvents dataEvents;
            private DataCollectionLogger dataLogger;
            private DataCollectionSink dataSink;
            private XmlElement configurationSettings;
            public override void Initialize(XmlElement configurationElement, DataCollectionEvents events,
           DataCollectionSink sink, DataCollectionLogger logger, DataCollectionEnvironmentContext environmentContext)
            {
                dataEvents = events;  // The test events
                dataLogger = logger;  // The error and warning log
                dataSink = sink;      // Saves collected data
                // Configuration from the test settings
                configurationSettings = configurationElement;
                // Register common events for the data collector
                dataEvents.TestCaseStart += new EventHandler<TestCaseStartEventArgs>(OnTestCaseStart);
                 
            }
            private void OnTestCaseStart(object sender, TestCaseStartEventArgs e)
            {
                try
                {
                    // Here how will get the output directory path
                }
                catch (Exception e1)
                {
    
                }
            }


     Thanks & Regards,

    woodson.

    • Edited by woodson.gen Wednesday, February 20, 2013 6:19 PM
    Wednesday, February 20, 2013 4:19 PM

All replies