Class: Raykit::VsTest

Inherits:
Object
  • Object
show all
Defined in:
lib/raykit/vstest.rb

Class Method Summary collapse

Class Method Details

.vstest_pathObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/raykit/vstest.rb', line 3

def self.vstest_path
    ['2019/Community/Common7/IDE/CommonExtensions/Microsoft',
     '2019/Professional/Common7/IDE/Extensions/TestPlatform',
     '2019/Community/Common7/IDE/Extensions',
     '2019/Community/Common7/IDE/Extensions/TestPlatform',
     '2022/Preview/Common7/IDE/Extensions/TestPlatform'].each{|relative_path|
        ['C:/Program Files (x86)/Microsoft Visual Studio/',
        'C:/Program Files/Microsoft Visual Studio/'].each{|root_path|
            path = root_path + relative_path
            exe_path = path + '/vstest.console.exe'
            return path if(Dir.exists?(path)) && File.exist?(exe_path)
        }  
    }
    return "vstest_path not found"
end