How to start tunnel in C# using Shell within the test execution?
Hi Helen,
You need to use the below-mentioned snippet to run the tunnel binary using Shell commands.
You can take a reference from this working sample.
//-------------------- Initializing and starting tunnel using binary-------------------------------//
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "D://LT_Windows (1)//LT.exe";
startInfo.Arguments = "/C LT --user LT_USERNAME --key LT_ACCESS_KEY";
process.StartInfo = startInfo;
process.Start();
Process_id = process.Id.ToString();
process_name = process.ProcessName.ToString();
System.Threading.Thread.Sleep(8000);
Console.WriteLine("TunnelId:" + Process_id);
Console.WriteLine("Binary Name" + process_name);