SpecFlow icon indicating copy to clipboard operation
SpecFlow copied to clipboard

Unable to execute tests in real devices (Sauce Labs) - SpecFlow with Mac OS

Open Udhay1316 opened this issue 4 years ago • 2 comments

SpecFlow Version

3.9.22

Which test runner are you using?

SpecFlow+ Runner

Test Runner Version Number

3.9.7

.NET Implementation

.NET Core 3.1

Project Format of the SpecFlow project

Classic project format using <PackageReference> tags

.feature.cs files are generated using

SpecFlow.Tools.MsBuild.Generation NuGet package

Test Execution Method

Command line – PLEASE SPECIFY THE FULL COMMAND LINE

SpecFlow Section in app.config or content of specflow.json

No response

Issue Description

When we run automation tests in real devices (Sauce Labs) both Android and iOS with SpecFlow on Mac OS, I am getting below

No test is available in /Users/XXX/XXX/test/XXX/XXX/XXXX/bin/Debug/netcoreapp3.1/XXXX.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.

None of the tests are triggered

Here are the software specifications

.Net Core 3.1 SpecFlow 3.9.22 SpecFlow.Tools.MsBuild.Generation 3.9.22 SpecRun.SpecFlow 3.9.7 Visual Studio 2019 Appium.WebDriver 4.2.1 Selenium WebDriver 3.141.0 We are using Sauce Labs for Real devices

Created a tunnel and we started executing from command line in Mac OS

Steps to Reproduce

Here are the steps

  • Updated default.srprofile - Target as Android
  • Set the driver to RemoteAndroidDriver()
  • Created a tunnel
  • Started executing from command line in Mac OS associated with tag
  • dotnet test --filter "tag=Platform_Android"

Link to Repro Project

No response

Udhay1316 avatar Sep 15 '21 22:09 Udhay1316

@SabotageAndi Please help us to get this resolved

Udhay1316 avatar Sep 15 '21 22:09 Udhay1316

Here is our app.config

<?xml version="1.0" encoding="utf-8"?>
<TestProfile xmlns="http://www.specflow.org/schemas/plus/TestProfile/1.5">
  <Settings projectName="XXXXXXX.QA.XXXXXXX" />
  <Report>
    <Template name="Report Templates/ReportTemplate_Json.cshtml" outputName="result.json"/>
    <Template name="Report Templates/ReportTemplate_Xml.cshtml" outputName="result.xml"/>
    <Template name="Report Templates/ReportTemplate_Xml-JUnit.cshtml" outputName="junit-result.xml"/>
  </Report>
  <Execution retryCount="0" stopAfterFailures="0" testThreadCount="1" testSchedulingMode="Sequential" />
  <!-- For collecting by a SpecRun server update and enable the following element. For using the 
      collected statistics, set testSchedulingMode="Adaptive" attribute on the <Execution> element.
    <Server serverUrl="http://specrunserver:6365" publishResults="true" />
  -->
  <TestAssemblyPaths>
    <TestAssemblyPath>XXXXXXX.dll</TestAssemblyPath>
  </TestAssemblyPaths>
  <DeploymentTransformation>
    <Steps>
      <!-- sample config transform to change the connection string-->
      <!--<ConfigFileTransformation configFile="App.config">
        <Transformation>
          <![CDATA[<?xml version="1.0" encoding="utf-8"?>
							<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
                <connectionStrings>
                  <add name="MyDatabase" connectionString="Data Source=.;Initial Catalog=MyDatabaseForTesting;Integrated Security=True" 
                       xdt:Locator="Match(name)" xdt:Transform="SetAttributes(connectionString)" />
                </connectionStrings>
							</configuration>
						]]>
        </Transformation>
      </ConfigFileTransformation>-->
    </Steps>
  </DeploymentTransformation>
  <Targets>
    <!--<Target name="Chrome">
      <Filter>Platform_Chrome</Filter>
      <DeploymentTransformationSteps>
        <EnvironmentVariable variable="Test_Platform" value="Chrome" />
      </DeploymentTransformationSteps>
    </Target>-->
    <Target name="Android">
      <Filter>Platform_Android</Filter>
      <DeploymentTransformationSteps>
        <EnvironmentVariable variable="Test_Platform" value="Android" />
      </DeploymentTransformationSteps>
    </Target>
    <!--<Target name="iOS">
      <Filter>Platform_iOS</Filter>
      <DeploymentTransformationSteps>
        <EnvironmentVariable variable="Test_Platform" value="iOS" />
      </DeploymentTransformationSteps>
    </Target>-->
  </Targets>
</TestProfile>

Udhay1316 avatar Sep 15 '21 22:09 Udhay1316