6.1.0 Can't open .bat file and reports don't open anymore

Bug reports.
j.wahl
Posts: 2
Joined: Thu Sep 15, 2016 2:43 pm

6.1.0 Can't open .bat file and reports don't open anymore

Post by j.wahl » Thu Sep 15, 2016 2:50 pm

Hello,
after the update I can't open a .bat file via user code.
If I try the same code in a new solution it works.

After my test stopped the report doesn't open, even though "Open report after execution" is enabled.

I updated from 6.0 to 6.1

This is my code.

Code: Select all

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;

using Ranorex;
using Ranorex.Core;
using Ranorex.Core.Testing;
using WinForms = System.Windows.Forms;

namespace EVOtools.Start
{
    public partial class Oeffne_db_leer
    {
        /// <summary>
        /// This method gets called right after the recording has been started.
        /// It can be used to execute recording specific initialization code.
        /// </summary>
        private static string REL_PATH_TO_DB_BAT = @"..\..\..\Environment\Server";
        
        private void Init()
        {
            // Your recording specific initialization code goes here.
        }

        public void openDB()
        {
        	ProcessStartInfo psi = new 
System.Diagnostics.ProcessStartInfo("start_clean_evotools_db.bat");
        	psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized;
        	psi.WorkingDirectory = Environment.CurrentDirectory + @"\" + REL_PATH_TO_DB_BAT;
        	Process.Start(psi);
        			
        }

    }
}
The .bat file is on a network drive, but I can open it in a new Solution with the same code.

Edit: With a absolute path I can open a .bat file, relative paths doesn't work.
But .exe files still work with relative paths.
Reports open, when i only run a recording, but don't when i start from "Test-Suite view".

User avatar
RobinHood42
Posts: 240
Joined: Fri Jan 09, 2015 3:24 pm

Re: 6.1.0 Can't open .bat file and reports don't open anymore

Post by RobinHood42 » Tue Sep 20, 2016 12:10 pm

Hi j.wahl,

First of all, please let us know which error message you receive. I guess this is just a problem with the defined path within your user code.

As for the report issue, please check whether the TestSuite setting "Enable report" is ticked.
  • • Open TestSuite Properties
    • Switch to „Report“ tab
    • „Enable Report“ setting
Cheers,
Robin

j.wahl
Posts: 2
Joined: Thu Sep 15, 2016 2:43 pm

Re: 6.1.0 Can't open .bat file and reports don't open anymore

Post by j.wahl » Fri Sep 23, 2016 11:00 am

Hi RobinHood42,

I don't get an error, it just doesn't start the .bat file.

And Enable Report is checked.
The Reports are generated correctly and I can open them, but they just don't open automaticly anymore.

User avatar
RobinHood42
Posts: 240
Joined: Fri Jan 09, 2015 3:24 pm

Re: 6.1.0 Can't open .bat file and reports don't open anymore

Post by RobinHood42 » Wed Sep 28, 2016 9:20 am

Hi j.wahl,

I'm afraid that it would be necessary to have a look at your solution and/or at your machine directly. If it's not possible to upload, I would suggest contacting Ranorex support ([email protected])

Cheers,
Robin