title,body,link,tags,view_count,is_answered,score,answer_count
Chromedriver.exe UI Testing Error with AzureDevOps,"<p>EasyRepo Selenium Tests running on Visual Studio 2019, but i get an error stating that the &quot;Chrome Driver&quot; does not exist, however the chromedriver.exe does indeed exist.</p>
<p>I want to conduct UI Tests via ADO Pipelines for Selenium EasyRepo whilst using Chrome on the Hosted Agent running on Windows 2019, but it keeps failing.</p>
<pre><code># YAML Azure DevOps Pipeline for Visual Studio UI Testing with NuGet and Chrome

trigger:
- master

pool:
  vmImage: 'windows-2019'

variables:
  solution: 'Automation.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:

- task: VisualStudioTestPlatformInstaller@1
  inputs:
    packageFeedSelector: 'nugetOrg'
    versionSelector: 'latestPreRelease'

- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    command: 'restore'
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: 'Automation.dll'
    searchFolder: '$(System.DefaultWorkingDirectory)'
    vsTestVersion: '16.0'
    runSettingsFile: 'TestSettings.runsettings'
</code></pre>
<p>In the app settings i have also hardcoded the web driver for chrome to see if it would make a difference.</p>
<pre><code>    &lt;add key=&quot;DriversPath&quot; value=&quot;C:\SeleniumWebDrivers\ChromeDriver&quot; /&gt;
</code></pre>
<p>The error;</p>
<pre><code>##[error]   [ERROR] The file D:\a\_temp\\Automation\bin\Debug\chromedriver.exe does not exist. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html
</code></pre>
",https://stackoverflow.com/questions/75314040/chromedriver-exe-ui-testing-error-with-azuredevops,"['selenium', 'google-chrome', 'azure-devops', 'coded-ui-tests', 'easyrepro']",31,False,0,0
UI Testing in Azure DevOps - Nunit,"<p>I already have a pipeline build and deploying and was trying to add UI Tests to it. I tried to follow microsoft documentation to run selenium tests but I'm failling to do it.</p>
<p>My release says: <code>No test sources found matching the given filter '**\Workio.AutomationTests.dll,!**\*TestAdapter.dll,!**\obj\**'</code></p>
<p>My solution folder looks like this:<br />
<a href=""https://i.stack.imgur.com/ExKZ5.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/ExKZ5.png"" alt=""enter image description here"" /></a></p>
<p>I read some people have similar problems using Nunit and VS test Task but can't find any way to make it work.</p>
<p>Build pipeline:</p>
<pre class=""lang-yaml prettyprint-override""><code>trigger:
  - master
  - development

pool:
  vmImage: windows-latest

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'
  MigrationName: $[format('{0}-{1}', 'Initial', counter(format('{0}-{1}', 'Initial', '-'), 1))]

steps:
- task: UseDotNet@2
  displayName: 'Install DotNet 6.0.x'
  inputs:
    version: '6.0.x'
    includePreviewVersions: true

- task: NuGetToolInstaller@1
  displayName: 'Install NuGetTool'

- task: DotNetCoreCLI@2
  displayName: 'DotNet restore'
  inputs:
    command: restore
    projects: '**/**/*.csproj'

- task: DotNetCoreCLI@2
  displayName: 'Run XUnit tests'
  inputs:
    command: test
    projects: '**/Workio.Tests/*.csproj'
    arguments: '--configuration $(buildConfiguration)'

- task: DotNetCoreCLI@2
  displayName: 'DotNet publish'
  inputs:
    command: publish
    publishWebProjects: True
    arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
    zipAfterPublish: true
- task: DotNetCoreCLI@2
  displayName: 'Install EF tools'
  inputs:
    command: custom
    custom: 'tool'
    arguments: 'install --global dotnet-ef'
  
- script: 'dotnet ef migrations script   --idempotent  --output migrations.sql --project Workio/Workio/Workio.csproj'
  displayName: Create EF Scripts
 
- task: CopyFiles@2
  displayName: 'Copy EF Scripts to Staging'
  inputs:
    Contents: |
     **\migrations.sql 
    TargetFolder: '$(Build.ArtifactStagingDirectory)'
    flattenFolders: true

- task: DotNetCoreCLI@2
  inputs:
    command: 'publish'
    publishWebProjects: false
    projects: '**/Workio.AutomationTests/*.csproj'
    arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
    zipAfterPublish: true
- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifacts'
</code></pre>
<p>My release:</p>
<p><a href=""https://i.stack.imgur.com/BU0qp.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/BU0qp.png"" alt=""enter image description here"" /></a></p>
<p>I'll appreciate any help</p>
",https://stackoverflow.com/questions/75954095/ui-testing-in-azure-devops-nunit,"['azure-devops', 'nunit', 'gui-testing']",18,False,0,0
UI Testing ways to utilise app switcher option,"<p>Can't find an option to move app to app-switcher and bring it back to active without launching the app during UITesting</p>
<p>I've found that there's an option in <strong>Assistive launch</strong> for app-switcher in iPhone, which resides in <strong>Device</strong> option. Hence, I hope there might be an option in UITesting too.</p>
<p>I found this <a href=""https://stackoverflow.com/questions/40653384/sending-app-to-background-and-re-launching-it-from-recents-in-xctest"">background and re-launching</a>, but I would like to open my app without relaunching for my test cases.</p>
<p>I expect to directly move to app-switcher and go back to my app.</p>
",https://stackoverflow.com/questions/76311894/ui-testing-ways-to-utilise-app-switcher-option,['xcode-ui-testing'],16,False,1,0
Change region in UI testing for each case,"<p>i am using <code>swift-snapshot-testing</code> library to do snapshot testing. It's important for me to do all the tests with different localization to check all the UIs when the text is changed.
For example, the UI testing scheme is set to run on German language and region, In some tests, I want to see the english version as well and I did that</p>
<pre><code>class BackgroundViewFactoryTests: XCTestCase {
    
    override class func setUp() {
        SnapshotTesting.diffTool = &quot;ksdiff&quot;
    }
    
    func test_backgroundView_contact_eng() {

        
        continueAfterFailure = false

        XCUIApplication().launchArguments += [&quot;-AppleLanguages&quot;, &quot;(en)&quot;]

        XCUIApplication().launchArguments += [&quot;-AppleLocale&quot;, &quot;en_UK&quot;]

        XCUIApplication().launch()
        
        let view = BackgroundViewFactory()
        view.backgroundColor = .darkGray
        assertSnapshot(matching: view, as: .image, record: false)
        
    }
}

</code></pre>
<p>But it's still not working and run on German language, could anyone give me hit?
Thanks</p>
",https://stackoverflow.com/questions/75364477/change-region-in-ui-testing-for-each-case,"['swift', 'xcode-ui-testing']",109,True,0,1
UI Testing for Power Platform on Azure DevOps,"<p>Tester on our team has created automated testing via Visual Studio, which uses chrome in order to perform tasks on an environment on Power Platform. The tests work successfully locally. This is EASYREPO.</p>
<p>I have created the following pipeline with YAML.</p>
<p>This Pipeline fails with &quot;Chrome driver does not exist&quot;.</p>
<p>I've followed Classic, and YAML based Microsoft Documents, and i cannot get anywhere with it.</p>
<p>##[error] [ERROR] The file D:\a_temp\<em>PROJECTNAME</em>chromedriver.exe does not exist. The driver can be downloaded at <a href=""http://chromedriver.storage.googleapis.com/index.html"" rel=""nofollow noreferrer"">http://chromedriver.storage.googleapis.com/index.html</a></p>
<p>I can confirm that the solution does have chrome driver exactly in the file it says it is not in....</p>
<pre><code>trigger:
- none

pool:
vmImage: 'windows-latest'
parameters:
- name: BrowserType
displayName: &quot;Test on Chrome&quot;
type: string
default: Chrome
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
Invoke-WebRequest -Uri &quot;https://chromedriver.storage.googleapis.com/75.0.3770.90/chromedriver_win32.zip&quot; -OutFile $(System.DefaultWorkingDirectory)/chromedriver_win32.zip;
Expand-Archive -Path $(System.DefaultWorkingDirectory)/chromedriver_win32.zip -DestinationPath $(System.DefaultWorkingDirectory)/chromedriver;
$env:webdriverpath = &quot;$(System.DefaultWorkingDirectory)/chromedriver&quot;
$env:path += &quot;;$env:webdriverpath&quot;
displayName: 'Download and install ChromeDriver'

- powershell: |
# Set agent screen resolution to 1920x1080 to avoid sizing issues with Portal
Set-DisplayResolution -Width 1920 -Height 1080 -Force

# Wait 10 seconds
Start-Sleep -s 10

# Verify Screen Resolution is set to 1920x1080
Get-DisplayResolution
ignoreLASTEXITCODE: true
displayName: &quot;Agent Screen Size&quot;
- task: NuGetCommand@2
displayName: 'Restore NuGet Packages'
inputs:
restoreSolution: '**\*.sln'
- task: VSBuild@1
displayName: 'Build Power Apps Test Automation Solution'
inputs:
solution: '**\*.sln'
- task: VSTest@2
displayName: 'Run Power Apps Test Automation Tests via Chrome'
condition: or(eq('${{ parameters.BrowserType }}', 'Chrome'), eq('${{ parameters.BrowserType }}', 'All'))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: 'DLL HERE'
searchFolder: '$(System.DefaultWorkingDirectory)'
uiTests: true
</code></pre>
",https://stackoverflow.com/questions/75100235/ui-testing-for-power-platform-on-azure-devops,"['powershell', 'azure-devops', 'yaml', 'ui-automation', 'power-platform']",67,False,0,0
How Jasmine tool is used for Selenium UI testing,"<p>How Jasmine with Selenium works for UI automation testing. What is the role of Jasmine in this?</p>
",https://stackoverflow.com/questions/75446232/how-jasmine-tool-is-used-for-selenium-ui-testing,"['user-interface', 'selenium-webdriver', 'testing', 'automation', 'jasmine']",12,False,0,0
How to run automated ui testing for ionic appflow builds?,"<p>I have an Angular-ionic app, and I'm using Ionic AppFlow to push new builds to the native Android and iOS apps.</p>
<p>I have automated UI tests running through Cypress to test that the app loads the correct content and has the desired behavior.</p>
<p>Cypress requires a running development server in order to run the tests. For example you'd start ionic dev server on <code>http://localhost:4100/</code> and write the Cypress test starting from visiting the app on <code>http://localhost:4100</code>:</p>
<pre><code>describe('Ionic app tests', () =&gt; {

    beforeEach(() =&gt; {
        cy.visit('http://localhost:4100');
    });

    it('test case description', () =&gt; {
        // ... test this and that
    });
});
</code></pre>
<p>In Ionic AppFlow, you'd build the app on <em>ionic cloud</em>, and push the build to mobile devices without running any development server on the cloud, therefore, according to <a href=""https://docs.cypress.io/guides/end-to-end-testing/testing-your-app"" rel=""nofollow noreferrer"">this</a>, I think Cypress isn't a suitable testing tool to test Ionic AppFlow builds.</p>
<p>My question to the community is - what automated UI testing tools can I use to test Ionic AppFlow builds after they are built on the cloud? Or in other words, how can I UI test my mobile app after it receives a new update through AppFlow?</p>
",https://stackoverflow.com/questions/76164974/how-to-run-automated-ui-testing-for-ionic-appflow-builds,"['ionic-framework', 'automated-tests', 'github-actions', 'cicd', 'ionic-appflow']",24,False,0,0
Android Compose UI testing: how get the Text from a node,"<p>I want in my test get the Text from a node.</p>
<pre><code>       **var nodes=onAllNodes(myNode).fetchSemanticsNodes()**

       println(&quot;Test_printlog ########### start ${nodes.size}&quot;)
       // give a corret number 
       for (node in nodes) {
            println(&quot;TestNODE ${node.config}&quot;)
</code></pre>
<p>I have:</p>
<pre><code>TestNODE SemanticsConfiguration@972964b{ mergeDescendants=true,TestTag : myTestTag, Text : my text,
</code></pre>
<p>If I want to get the Text property I tried to use <code>node.config.get</code>
but wat is the parameter to pass to the get to get the text?</p>
<p>in the documentation said:</p>
<blockquote>
<p>androidx.compose.ui.semantics.SemanticsConfiguration public final
operator fun  get(
key: SemanticsPropertyKey ): T Retrieves the value for the given property if one has been set. If a value has not been set,
throws IllegalStateException</p>
</blockquote>
<p>I try several time... but I have always error</p>
<p>like for example if I use node.config.get(&quot;Text&quot;)</p>
<blockquote>
<p>Type mismatch. Required: SemanticsPropertyKey&lt;TypeVariable(T)&gt; Found:
String</p>
</blockquote>
<p>What is the correct syntax to get the Text property from <code>node.config.get</code>?</p>
",https://stackoverflow.com/questions/75451335/android-compose-ui-testing-how-get-the-text-from-a-node,"['android', 'testing', 'android-jetpack-compose']",338,False,0,1
Can I use espresso framework for Android UI testing in Unity app?,"<p>I'm trying to add a few integration tests in my Android app made with Unity. I'm not able to get a reference to WebView displayed by the GoogleMobileAds SDK.
Here is the method I'm trying to run on my app:</p>
<pre><code>onView(allOf(isAssignableFrom(WebView.class),
           withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
   .perform(executeJs(&quot;document.querySelector('&quot; + id + &quot;').click()&quot;))
</code></pre>
<p>I get the following error when I run the test:</p>
<pre><code>androidx.test.espresso.NoActivityResumedException: No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?
    at dalvik.system.VMStack.getThreadStackTrace(Native Method)
    at java.lang.Thread.getStackTrace(Thread.java:1736)
    at androidx.test.espresso.base.EspressoExceptionHandler.handleSafely(EspressoExceptionHandler.java:34)
    at androidx.test.espresso.base.EspressoExceptionHandler.handleSafely(EspressoExceptionHandler.java:26)
    at androidx.test.espresso.base.DefaultFailureHandler$TypedFailureHandler.handle(DefaultFailureHandler.java:167)
    at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:128)
    at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:386)
    at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:213)
    at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:140)
</code></pre>
<p>I am running the test on an emulator. So the screen is ON and the app is visible.
Can I use espresso at all on Unity?</p>
",https://stackoverflow.com/questions/75669743/can-i-use-espresso-framework-for-android-ui-testing-in-unity-app,"['android', 'unity-game-engine', 'user-interface', 'testing', 'frameworks']",19,False,0,0
UI Testing Error: No instrumentation registered! Must run under a registering instrumentation,"<p>I started learning Espresso<br />
I need to start the activity and set the permission for the camera.</p>
<pre><code>@RunWith(AndroidJUnit4ClassRunner::class)
class MainActivityTest{

    @get:Rule
    var activityScenarioRule = activityScenarioRule&lt;MainActivity&gt;()

    @get:Rule
    val permissionRule = GrantPermissionRule.grant(
        Manifest.permission.CAMERA
    )

    @Test
    fun checkName(){
        onView(withId(R.id.etName)).perform(typeText(&quot;Alex&quot;))
        onView(withId(R.id.btSend)).perform(click())
        onView(withId(R.id.tvName)).check(matches(isDisplayed()))
        onView(withId(R.id.tvName)).check(matches(withText(&quot;Alex&quot;)))
    }
}
</code></pre>
<p>But after running the test, returns an error</p>
<pre><code>java.lang.IllegalStateException: No instrumentation registered! Must run under a registering instrumentation.
at android.support.test.InstrumentationRegistry.getInstrumentation(InstrumentationRegistry.java:44)
at android.support.test.InstrumentationRegistry.getTargetContext(InstrumentationRegistry.java:82)
at android.support.test.runner.permission.PermissionRequester.&lt;init&gt;(PermissionRequester.java:66)
at android.support.test.rule.GrantPermissionRule.&lt;init&gt;(GrantPermissionRule.java:69)
at android.support.test.rule.GrantPermissionRule.grant(GrantPermissionRule.java:88)
at com.example.espressotest.MainActivityTest.&lt;init&gt;(MainActivityTest.kt:26)
</code></pre>
<p>My dependencies</p>
<pre><code>dependencies {

    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation 'com.google.android.material:material:1.7.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    androidTestImplementation 'com.android.support.test:rules:1.0.2'

    androidTestImplementation &quot;androidx.test:runner:1.5.2&quot;
    androidTestImplementation &quot;androidx.test:runner:1.5.2&quot;
    androidTestImplementation &quot;androidx.test.ext:junit-ktx:1.1.5&quot;
}
</code></pre>
<p>I expect that when the test starts, the camera permission will be automatically applied</p>
",https://stackoverflow.com/questions/75149573/ui-testing-error-no-instrumentation-registered-must-run-under-a-registering-in,"['android', 'kotlin', 'android-espresso']",100,False,0,2
Xcode UI testing right-to-left language but UI is left-to-right,"<p>In my UI test I'm trying to set different languages. I noticed that with right-to-left languages, such as Arabic, the UI is still aligned left-to-right. When I manually run the app with the scheme's language set to Arabic, the UI is correctly aligned right-to-left. Am I missing something?</p>
<pre><code>let app = XCUIApplication()
app.launchArguments += [&quot;-AppleLanguages&quot;, &quot;(ar)&quot;]
app.launch()
</code></pre>
",https://stackoverflow.com/questions/75734159/xcode-ui-testing-right-to-left-language-but-ui-is-left-to-right,"['xcode', 'cocoa', 'xctest']",17,False,0,0
I get keep getting &#39;Instrumentation run failed due to Process crashed.&#39; error with jetpack compose ui testing,"<p>I am trying to write ui test with compose. And I get <code>Instrumentation run failed due to Process crashed.</code> error. Is there any solution? here's my test code.</p>
<pre><code>@HiltAndroidTest
class VitaminScreenComposeTest {
    @get:Rule(order = 0)
    val hiltRule = HiltAndroidRule(this)

    @get:Rule(order = 1)
    val composeTestRule = createComposeRule()

    @Before
    fun setup() {
        hiltRule.inject()
    }

    @Test
    fun entryQuestionLayout(){
        val entryQuestionJson = loadFileText(this, &quot;/surveyQuestion.json&quot;)
        val entryQuestion = Gson().fromJsonToArrayList(entryQuestionJson, Question::class.java)[0]

        composeTestRule.setContent {
            VitaminScreen(false, entryQuestion, {},{},{})
        }

        composeTestRule.onNodeWithText(&quot;scientific&quot;).assertIsDisplayed()
        composeTestRule.onNodeWithText(&quot;professional&quot;).assertIsDisplayed()
    }
}
</code></pre>
",https://stackoverflow.com/questions/75647879/i-get-keep-getting-instrumentation-run-failed-due-to-process-crashed-error-wi,"['android', 'kotlin', 'android-jetpack-compose']",74,False,1,0
"How to take iOS screenshots from &quot;Unit Testing Bundle&quot; XCode projects, as opposed to &quot;UI Testing Bundle&quot; projects?","<p>In XCode (as of 14.3) there are two types of testing projects;
<a href=""https://i.stack.imgur.com/SGptO.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/SGptO.png"" alt=""enter image description here"" /></a></p>
<p>My understanding of them is;</p>
<p><strong>Unit Testing Bundle</strong> - great for White Box testing, can (optionally) access Host Application APIs.</p>
<p><strong>UI Testing Bundle</strong> - great for Black Box testing, cannot access Host Application APIs.</p>
<p>I would like to use the fantastic screenshot APIs of XCUIScreenshot as part of my Unit Testing bundles, but cannot seem to get it to work.</p>
<p>A few things I've tried:</p>
<ol>
<li><p>define a XCUIApplication as part of the XCTestCase init;</p>
<p>app = XCUIApplication()
let screenshot = app.windows.firstMatch.screenshot()</p>
</li>
</ol>
<p>This obviously works well in UI Testing Bundle tests, but when its not a UI Test, the XCUIApplication cannot be created no matter the scheme. This kind of makes sense, as in the UI tests, it expects to manage this thing completely.</p>
<ol start=""2"">
<li><p>use XCUIScreen to create it</p>
<p>let screenshot = XCUIScreen.main.screenshot()</p>
</li>
</ol>
<p>For a similar reason this fails; I've tried this on device and in simulator, there error is:</p>
<blockquote>
<p>Failed to get screenshot: Not authorized for performing UI testing
actions.</p>
</blockquote>
<p>My hunch is that the screenshot capability is really being triggered &quot;outside the device&quot;, and this is just not possible, but haven't found any conclusive text to say so.</p>
<p>Anyone with insight one direction or the other?</p>
<p>Footnote; my workaround is to use a UI Testing bundle, then bake in the white box code i need into my app, and trigger it via command line arguments...  but it all feels pretty hoop jumpy. I want to do this to generate App Store screenshots as well as test various parts of my UI, and testing via pure button clicks is also, not ideal :)</p>
",https://stackoverflow.com/questions/76367395/how-to-take-ios-screenshots-from-unit-testing-bundle-xcode-projects-as-oppose,"['ios', 'swift', 'xcode', 'unit-testing', 'xcode-ui-testing']",27,True,0,1
Unable to find the Xpath for Angular Web Page. Suggestions for testing Angular UI,"<pre><code>&lt;div class=&quot;mat-form-field-infix&quot;\&gt;\&lt;input \_ngcontent-uji-c1=&quot;&quot; class=&quot;mat-input-element mat-form-field-autofill-control cdk-text-field-autofill-monitored cdk-text-field-autofilled ng-dirty ng-valid ng-touched&quot; matinput=&quot;&quot; name=&quot;username&quot; placeholder=&quot;Username&quot; value=&quot;&quot; ng-reflect-form=&quot;\[object Object\]&quot; ng-reflect-model=&quot;Suresh_RIA&quot; ng-reflect-placeholder=&quot;Username&quot; ng-reflect-value=&quot;&quot; id=&quot;mat-input-0&quot; aria-invalid=&quot;false&quot; aria-required=&quot;false&quot;\&gt;
</code></pre>
<p>I am completely new to Angular UI testing.</p>
",https://stackoverflow.com/questions/75662459/unable-to-find-the-xpath-for-angular-web-page-suggestions-for-testing-angular-u,"['angularjs', 'selenium-webdriver', 'xpath']",21,False,0,0
Is it possible to implement a hook in pytest to re-run failed tests and change the outcome to &#39;passed&#39; if the second attempt passes?,"<p>Below is the current state of my pytest hook. Ive gotten this working relatively well, but I need some help seeing if my goal is actually possible.</p>
<p>Right now, I can use this hook to re-run a test upon first failure, and attempt that test one more time in order to assume the test really did fail or not. I am in UI testing and I know that this is a horrible practice, but this is for a proof of concept. UI testing in my area generally leads to flaky results.</p>
<p>This code works, but my setup and teardown functions are not being accessed during the re-run. Is it possible to call the setup and teardown here?</p>
<pre><code>@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_makereport(item, call):
    report = yield
    result = report.get_result()
    if result.outcome == 'failed':
        try:
            # Run the original tests teardown
            # Run the tests setup
            attempt = item.runtest()
            # Run the tests teardown
        except:
            attempt = 'failed'
        if not attempt:
            result.outcome = 'passed'
</code></pre>
",https://stackoverflow.com/questions/75337826/is-it-possible-to-implement-a-hook-in-pytest-to-re-run-failed-tests-and-change-t,"['python', 'pytest', 'hook']",144,False,0,0
"How to take iOS screenshots from &quot;Unit Testing Bundle&quot; XCode projects, as opposed to &quot;UI Testing Bundle&quot; projects?","<p>In XCode (as of 14.3) there are two types of testing projects;
<a href=""https://i.stack.imgur.com/SGptO.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/SGptO.png"" alt=""enter image description here"" /></a></p>
<p>My understanding of them is;</p>
<p><strong>Unit Testing Bundle</strong> - great for White Box testing, can (optionally) access Host Application APIs.</p>
<p><strong>UI Testing Bundle</strong> - great for Black Box testing, cannot access Host Application APIs.</p>
<p>I would like to use the fantastic screenshot APIs of XCUIScreenshot as part of my Unit Testing bundles, but cannot seem to get it to work.</p>
<p>A few things I've tried:</p>
<ol>
<li><p>define a XCUIApplication as part of the XCTestCase init;</p>
<p>app = XCUIApplication()
let screenshot = app.windows.firstMatch.screenshot()</p>
</li>
</ol>
<p>This obviously works well in UI Testing Bundle tests, but when its not a UI Test, the XCUIApplication cannot be created no matter the scheme. This kind of makes sense, as in the UI tests, it expects to manage this thing completely.</p>
<ol start=""2"">
<li><p>use XCUIScreen to create it</p>
<p>let screenshot = XCUIScreen.main.screenshot()</p>
</li>
</ol>
<p>For a similar reason this fails; I've tried this on device and in simulator, there error is:</p>
<blockquote>
<p>Failed to get screenshot: Not authorized for performing UI testing
actions.</p>
</blockquote>
<p>My hunch is that the screenshot capability is really being triggered &quot;outside the device&quot;, and this is just not possible, but haven't found any conclusive text to say so.</p>
<p>Anyone with insight one direction or the other?</p>
<p>Footnote; my workaround is to use a UI Testing bundle, then bake in the white box code i need into my app, and trigger it via command line arguments...  but it all feels pretty hoop jumpy. I want to do this to generate App Store screenshots as well as test various parts of my UI, and testing via pure button clicks is also, not ideal :)</p>
",https://stackoverflow.com/questions/76367395/how-to-take-ios-screenshots-from-unit-testing-bundle-xcode-projects-as-oppose,"['ios', 'swift', 'xcode', 'unit-testing', 'xcode-ui-testing']",27,True,0,1
Testing Angular - How can I test disabled field using Selenium Protractor?,"<p>In MEAN stack project I am using Selenium webdriver for frontend UI testing.</p>
<p>I have a field which is non editable. I have attached an image</p>
<p><a href=""https://i.stack.imgur.com/bbtkD.png"" rel=""nofollow noreferrer"">Image</a></p>
<p>How can I test this field making sure it cannot be edited?</p>
<pre><code>
    it('not edit the field', () =&gt; {
        login('amazonuser');
        click(by.xpath('//mat-option[5]/span[contains(., &quot;Amazon Id&quot;)]'));
        getElement(by.xpath('//id-number/div/mat-form-field[2]/div/div[1]/div/input')).sendKeys('0');
        logout();
    });
</code></pre>
",https://stackoverflow.com/questions/75826512/testing-angular-how-can-i-test-disabled-field-using-selenium-protractor,"['angular', 'selenium-webdriver', 'automated-tests', 'protractor', 'disabled-input']",36,True,1,1
Error: Composition: Missing stories.json version with https://storybook.js.org/,"<p>I am doing this tutorial :<a href=""https://storybook.js.org/tutorials/ui-testing-handbook/react/en/visual-testing/"" rel=""nofollow noreferrer"">https://storybook.js.org/tutorials/ui-testing-handbook/react/en/visual-testing/</a>
When I ran this code</p>
<pre><code>import React from 'react';
import { Task } from './Task';

export default {
  component: Task,
  title: 'Task',
  argTypes: {
    onArchiveTask: { action: 'onArchiveTask' },
    onTogglePinTask: { action: 'onTogglePinTask' },
    onEditTitle: { action: 'onEditTitle' },
  },
};

const Template = (args) =&gt; &lt;Task {...args} /&gt;;

export const Default = Template.bind({});
Default.args = {
  task: {
    id: '1',
    title: 'Buy milk',
    state: 'TASK_INBOX',
  },
};
</code></pre>
<p>All the code and story book ran fine . But when I ran this:</p>
<pre><code>import React from 'react';
import { Task } from './Task';

export default {
  component: Task,
  title: 'Task',
  argTypes: {
    onArchiveTask: { action: 'onArchiveTask' },
    onTogglePinTask: { action: 'onTogglePinTask' },
    onEditTitle: { action: 'onEditTitle' },
  },
};

const Template = (args) =&gt; &lt;Task {...args} /&gt;;

export const Default = Template.bind({});
Default.args = {
  task: {
    id: '1',
    title: 'Buy milk',
    state: 'TASK_INBOX',
  },
};

export const Pinned = Template.bind({});
Pinned.args = {
  task: {
    id: '2',
    title: 'QA dropdown',
    state: 'TASK_PINNED',
  },
};

export const Archived = Template.bind({});
Archived.args = {
  task: {
    id: '3',
    title: 'Write schema for account menu',
    state: 'TASK_ARCHIVED',
  },
};
</code></pre>
<p>The browser show me this error :</p>
<pre><code>Couldn't find any stories in your Storybook.
</code></pre>
<p>and in the console said</p>
<pre><code>Unexpected error while loading ./components/Task.stories.js: Module build failed (from ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js):
SyntaxError: C:\storybook\ui-testing-guide-code\src\components\Task.stories.js: Missing initializer in const declaration. (29:19)```
Any idea why this is happening?
</code></pre>
",https://stackoverflow.com/questions/75035137/error-composition-missing-stories-json-version-with-https-storybook-js-org,"['reactjs', 'storybook']",40,False,0,1
How to use Leakcanary for Service (like InputMethodService),"<p>My application is Keyboard IME Service, with some UI for config and testing.</p>
<p><code>D/LeakCanary: LeakCanary is currently disabled: Waiting for debugger to detach.</code> comes first.
Then</p>
<p><code>D/LeakCanary: Watching instance of .... </code> (UI's Activity) comes second as I also have an activity for UI testing.</p>
<p>However, when I open the keyboard, there is no watching message.</p>
<p>How to &quot;install&quot; it into the Service?</p>
<p>A log message shall be shown for watching my Service</p>
",https://stackoverflow.com/questions/76183862/how-to-use-leakcanary-for-service-like-inputmethodservice,"['java', 'android', 'service', 'leakcanary']",18,False,0,0
SwiftUI XCTest - How to increase velocity of scrolling?,"<p>I wrote a method that allows me to scroll list of elements on the screen for UI testing:</p>
<pre><code>func scrollToElement(element: XCUIElement, maxScrolls: Int = 10) {
    var numberOfScrolls = 0
    while !element.isHittable, numberOfScrolls &lt; maxScrolls {
        app.swipeUp()
        numberOfScrolls += 1
    }
}
</code></pre>
<p>Everything works fine but it takes too much time for the UI test to verify ie. wait until every scrolled view will be checked whether the element is available.
Is there any possible method or way to increase the velocity of scrolling?</p>
<p>Thanks in advance!</p>
",https://stackoverflow.com/questions/75487085/swiftui-xctest-how-to-increase-velocity-of-scrolling,"['swift', 'swiftui', 'scroll', 'xctest', 'xcuitest']",35,False,0,1
How do i set test suite name while using cucumber xml report?,"<p>I am using cucumber java for my selenium UI testing, here is my feature file</p>
<pre><code>@space
Feature: Login
  Background:
    Given Person launched the login page of web
  Scenario: web should accept accounts.dev login credentials
    And person enters valid domain id from line 1
    When Person enters valid Email and Password
    And Person clicks on the Login button
    Then Person should be authenticated
</code></pre>
<p>for reporting i send the results to testrail so i use the Junit: cucumber-xml to generate xml based report. When i run my test my test suite name is filled with the plugin name like this &quot;io.cucumber.core.plugin.JUnitFormatter&quot; is there a way i can set my test suite name?</p>
<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;
&lt;testsuite errors=&quot;0&quot; failures=&quot;0&quot; name=&quot;io.cucumber.core.plugin.JUnitFormatter&quot; skipped=&quot;0&quot; tests=&quot;1&quot; time=&quot;4.889&quot;&gt;
    &lt;testcase classname=&quot;Login&quot; name=&quot;Spacecloud should accept accounts.dev login credentials&quot; time=&quot;4.724&quot;&gt;
        &lt;system-out&gt;&lt;![CDATA[Given Person launched the login page of SpaceCloud..........................passed
And person enters valid domain id from line 1...............................passed
When Person enters valid Email and Password.................................passed
And Person clicks on the Login button.......................................passed
Then Person should be authenticated.........................................passed
]]&gt;&lt;/system-out&gt;
    &lt;/testcase&gt;
&lt;/testsuite&gt;
</code></pre>
<p>I tried using the @tags but it didnt work for me.</p>
",https://stackoverflow.com/questions/75534402/how-do-i-set-test-suite-name-while-using-cucumber-xml-report,"['cucumber', 'cucumber-jvm', 'cucumber-java']",109,False,0,0
Change region in UI testing for each case,"<p>i am using <code>swift-snapshot-testing</code> library to do snapshot testing. It's important for me to do all the tests with different localization to check all the UIs when the text is changed.
For example, the UI testing scheme is set to run on German language and region, In some tests, I want to see the english version as well and I did that</p>
<pre><code>class BackgroundViewFactoryTests: XCTestCase {
    
    override class func setUp() {
        SnapshotTesting.diffTool = &quot;ksdiff&quot;
    }
    
    func test_backgroundView_contact_eng() {

        
        continueAfterFailure = false

        XCUIApplication().launchArguments += [&quot;-AppleLanguages&quot;, &quot;(en)&quot;]

        XCUIApplication().launchArguments += [&quot;-AppleLocale&quot;, &quot;en_UK&quot;]

        XCUIApplication().launch()
        
        let view = BackgroundViewFactory()
        view.backgroundColor = .darkGray
        assertSnapshot(matching: view, as: .image, record: false)
        
    }
}

</code></pre>
<p>But it's still not working and run on German language, could anyone give me hit?
Thanks</p>
",https://stackoverflow.com/questions/75364477/change-region-in-ui-testing-for-each-case,"['swift', 'xcode-ui-testing']",109,True,0,1
Load testing with FitNesse,"<p>I am looking for ways to perform load testing with FitNesse. My colleagues use a low-code platform and a common complaint is that their applications work fine until the load gets high. I have recently started using FitNesse (+ HSAC fixtures) for functional UI testing and was wondering if it is possible to run some of those tests multiple times simuntaneously. I have done some Google searches and asked ChatGPT, but it has been difficult to find information on this topic. Can someone please point me in the right direction?</p>
",https://stackoverflow.com/questions/75545304/load-testing-with-fitnesse,"['testing', 'load-testing', 'fitnesse']",43,False,0,2
How to check the orientation of my app in espresso?,"<p>I am using espresso for android ui testing. I want to test whether my screen is in portrait mode. I am using Kotlin programming language.</p>
<p>What did I try: I tried to search how to perform this. But all I could get was change the orientation of the app using espresso.</p>
<p>So I tried this:</p>
<pre><code>@Test
    fun isOrientationVertical() {
        assertEquals(resources.configuration.orientation, Configuration.ORIENTATION_LANDSCAPE.toString())
    }
</code></pre>
<p>However, 'resources' (to be precise, getResources()) is not getting detected.</p>
<p>What am I expecting: Something like this:</p>
<ol>
<li>x = get the orientation</li>
<li>assert equals(if x is equal to portrait)</li>
</ol>
<p>Thanks a lot in advance. Please do let me know if I am not clear.</p>
",https://stackoverflow.com/questions/75579487/how-to-check-the-orientation-of-my-app-in-espresso,"['android', 'kotlin', 'orientation', 'android-espresso', 'gui-testing']",68,False,0,1
What are the tests need to be written in android application?,"<p>I am trying to test Android application for example if I am consuming api calls, what are the tests that need to be done?</p>
<p>I have tried standard assertEquals using JUnit. I also have seen people taking about MockK or Mokito for integration testing. And Espresso for UI testing. I want to know what are the features I should test. If I am going to use JUnit which one do I use? Junit4 or Junit5? What is the difference?
`class ViewModelTest {</p>
<pre><code>@Before
fun setUp() {
}

@After
fun tearDown() {
}

@Test
fun getErrorMessage() {
}

@Test
fun getNewsList() {
}

@Test
fun getLoading() {
}

@Test
fun getJob() {
}

@Test
fun setJob() {
}

@Test
fun getAllNews() {
}`
</code></pre>
<p>This is so fat what I have got generate test cases. Not sure what to do next.</p>
",https://stackoverflow.com/questions/76274495/what-are-the-tests-need-to-be-written-in-android-application,"['android', 'kotlin', 'unit-testing', 'junit', 'mockito']",30,False,-1,0
How to grab a path for app.navigationBars,"<p>I faced an issue that is combined with UI testing of the view.
I have an issue with an incorrect path to the element that is the text field, which is Search. I would like to achieve the state when the code for <strong>app.navigationBars</strong> will be resistant for different languages. That's why right now it looks the following way:</p>
<p><code>    var airportsSearchTextField: XCUIElement { app.navigationBars[&quot;Airports&quot;].searchFields[&quot;Search&quot;] }</code></p>
<p>This won't work properly for another language like English. I know that it could be possible to add accessibilityIdentifier, but I'm not sure where and maybe for navigationBar is there any other way to implement a better solution to grab this element within UI tests?</p>
<p><code>   func selectFlight() { airportsSearchTextField.tap() }</code></p>
",https://stackoverflow.com/questions/75502111/how-to-grab-a-path-for-app-navigationbars,"['swift', 'swiftui', 'xcuitest', 'xcuielement']",29,False,0,1
How to assert for errors in Playwright?,"<p>I'm going nuts trying to assert for a known TimeoutError. I'm currently testing for the Hidden Layers scenario from <a href=""http://www.uitestingplayground.com/hiddenlayers"" rel=""nofollow noreferrer"">UI Testing Playground</a> in Playwright Node.js and I would like to know if it's possible to have the TimeoutError not to fail the test, as this is the expectation. I'm pretty new in automating with both Playwright and Typescript.</p>
<p>I have tried multiple methods even making the <code>clickGreenButton()</code> method throw the error, but it seems the <strong>expect()</strong> function does not catch it at all.</p>
<p>Method inside the <code>HiddenLayersPage.ts</code>:</p>
<pre><code>    async clickGreenButton() {
        await this.greenButton.click()
    }
</code></pre>
<p>Code inside the spec file which is supposed to check that the second click would not be successful as the element to be clicked becomes hidden:</p>
<pre><code>await hiddenLayersPage.clickGreenButton();
expect(async () =&gt; await hiddenLayersPage.clickGreenButton()).toThrow();
</code></pre>
",https://stackoverflow.com/questions/75440537/how-to-assert-for-errors-in-playwright,"['typescript', 'ui-automation', 'playwright']",638,True,0,1
How to run automated ui testing for ionic appflow builds?,"<p>I have an Angular-ionic app, and I'm using Ionic AppFlow to push new builds to the native Android and iOS apps.</p>
<p>I have automated UI tests running through Cypress to test that the app loads the correct content and has the desired behavior.</p>
<p>Cypress requires a running development server in order to run the tests. For example you'd start ionic dev server on <code>http://localhost:4100/</code> and write the Cypress test starting from visiting the app on <code>http://localhost:4100</code>:</p>
<pre><code>describe('Ionic app tests', () =&gt; {

    beforeEach(() =&gt; {
        cy.visit('http://localhost:4100');
    });

    it('test case description', () =&gt; {
        // ... test this and that
    });
});
</code></pre>
<p>In Ionic AppFlow, you'd build the app on <em>ionic cloud</em>, and push the build to mobile devices without running any development server on the cloud, therefore, according to <a href=""https://docs.cypress.io/guides/end-to-end-testing/testing-your-app"" rel=""nofollow noreferrer"">this</a>, I think Cypress isn't a suitable testing tool to test Ionic AppFlow builds.</p>
<p>My question to the community is - what automated UI testing tools can I use to test Ionic AppFlow builds after they are built on the cloud? Or in other words, how can I UI test my mobile app after it receives a new update through AppFlow?</p>
",https://stackoverflow.com/questions/76164974/how-to-run-automated-ui-testing-for-ionic-appflow-builds,"['ionic-framework', 'automated-tests', 'github-actions', 'cicd', 'ionic-appflow']",24,False,0,0
Pytest retry logic upon one unsuccessful test,"<p>In my pytest suite, I run plenty of iOS UI tests. Which comes with plenty of frustrating issues. Im experimenting with the use of a hook based retry logic. Essentially, I have a <code>pytest_runtest_call</code> hook, where I collect the output of a test via a <code>yield</code>, and do extra processing with that data. Based on the failed output of the test I would like to re-trigger the test again, including the setup and teardown of the test. Is this possible? I am trying to do this without adding any extra packages (reinventing the wheel here, but in an effort to better understand pytest logic). Here's the idea of where I'm currently at with my hook:</p>
<pre><code>def pytest_runtest_call(item):
    output = yield
    if output.excinfo:
        # The retry_logic_handler.should_try will return a bool of whether or not to retry the test
        if retry_logic_handler.should_retry(item):
            # Re-run this test including the runtest_setup &amp; runtest_teardown 
            ...
        _validate_expected_failures(output)
</code></pre>
<p>I understand I will get a lot of &quot;just write better tests&quot; but in my case, UI testing is rather unpredictable. And the data I am collecting helps clarify why a retry is required.</p>
<p>So the ultimate question is, how can I add retry logic to my pytest hooks?</p>
",https://stackoverflow.com/questions/75238396/pytest-retry-logic-upon-one-unsuccessful-test,"['python', 'testing', 'pytest']",54,True,0,1
How to assert a component structure using RTL,"<p>I have been getting better at unit testing nodejs code with jest but now i'm moving into RTL for UI testing and i had something i'm not sure about.</p>
<p>Is there some standard or way you guys assert the structure of you components? for example, the lets assume this component that has multiple nested ordered and unordered list, i was looking into that and although i can simply do assert on a screen.findByText on some text in that component of nested list, it doesnt help with the structure of it, like if its nested list or nested divs or anything, it doesnt tell me where that text is in relation to what i would expect to see only that it exist, (maybe the text is in the second nested list and not the root list or some other nested list, so how would u handle that?</p>
<p>this is one example but i even have data tables with tables within it and idk how to make sure the structure is correct.</p>
<p>Thank you.</p>
",https://stackoverflow.com/questions/75194829/how-to-assert-a-component-structure-using-rtl,"['node.js', 'reactjs', 'unit-testing', 'jestjs', 'react-testing-library']",30,True,0,1
Trouble getting Selenum automated testing to auto-login using my profile,"<p>I'm using MS Edge browser (Version 109.0.1518.78) along with Selenium to do some automated UI testing with my corp environment.</p>
<p>Trouble is, the tests are always prompting challenging me to login.
Now here's the confusion: when i use Edge normally, the browser uses my profile settings to auto-authenticate me. However, when running the tests (via Visual Studio), an Edge browser instance is started WITHOUT my profile.</p>
<p><strong>First thing I tried:</strong></p>
<p>I have tried following various example without any success, such as <a href=""https://stackoverflow.com/questions/65184163/edge-automation-with-selenium-credential-required-constantly"">this one from SO</a>. Using this example i added these 2 arguments like this:</p>
<p><a href=""https://i.stack.imgur.com/moPO8.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/moPO8.png"" alt=""enter image description here"" /></a></p>
<p>This didn't do anything. So I'm wondering if maybe the arguments have changed? The edge driver documentation is worthless when it comes to this.</p>
<p><strong>Second thing I tried:</strong></p>
<p>I tried creating edge driver service with arguments of my edge driver path.
<a href=""https://i.stack.imgur.com/O6GLL.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/O6GLL.png"" alt=""enter image description here"" /></a></p>
<p>Unfortunately, i get a driver initialization error saying something about &quot;msedge.exe&quot;.</p>
<p><strong>Summary</strong></p>
<p>The summarize, my problem is that my selenium tests are starting an edge browser instance without my default corp profile. therefore i am forced to manually login, which is what i want to avoid.</p>
<p>Note that occassionally things will work fine as expected. Then suddenly the next day it reverts to this default behavior again. I am no sure what is going on!</p>
",https://stackoverflow.com/questions/75364211/trouble-getting-selenum-automated-testing-to-auto-login-using-my-profile,"['selenium', 'selenium-webdriver']",24,False,1,0
Setup dependency injection manager in tests target,"<p>I have a dependency injection manager in my main target. In my tests, I inject manually in most places. However, I am currently adding UI testing, and need to load an image loader in the tests target, one that will load a local placeholder instead of making network calls.</p>
<p>I would like that second concrete implementation not to be part of the main target but only of the tests one. My issue is that I can't figure out a place where to setup my dependency injection manager in the tests target to use that class only defined in the tests..</p>
<p>The main.swift can't create an instance of that test image loader because it's not part of the main target, and it seems like there isn't any piece of code that's run before any test case is executed.</p>
<p>Is there a way to setup a dependency injection manager differently in the test target or am I completly on the wrong path here ?</p>
<p>To give a bit more context, the image loader is used in many places, sometimes nested in subviews of subviews, or also in tableView / collectionView cells. It would be quite a pain to manually inject that loader everywhere in the tests.</p>
<p>Thank you for you time</p>
",https://stackoverflow.com/questions/75737141/setup-dependency-injection-manager-in-tests-target,"['ios', 'swift', 'xcode', 'unit-testing', 'dependency-injection']",30,False,-1,1
ReferenceError: Can&#39;t find variable: Pickr when running shinytest::recordTest(),"<p>I am currently working on an RShiny App which became pretty big and hence I want to implement automated UI testing. I therefore tried to record my UI tests with recordTest() from the shinytest package. However, when I run shinytest::recordTest(), I get the error message &quot;ReferenceError: Can't find variable: Pickr&quot; (see attached image). I located the problem to be a colorPickr from the shinyWidgets package and it seems like it has something to do with a .js-File in the package, but I have no idea how to solve this problem.</p>
<p><a href=""https://i.stack.imgur.com/CfwiF.png"" rel=""nofollow noreferrer"">Error Message</a></p>
<p>When running shinytest::recordTest(), I usually would expect that the app starts in a headless browser and I can record my tests. This works perfectly fine, when I disable the line of code where the colorPickr is defined. With the colorPickr, the above error occurs.</p>
<p>I tried to update my R version (unfortunately we are working with 3.6.0 currently) and updated all packages, which did not help. I also tried to install phantomJS and set my PATH variable to the phantomjs.exe. Did not help either (not sure if I did that correctly tbh).</p>
<p>The package versions I use are: shinytest_1.5.1, shinyWidgets_0.6.2, shiny_1.6.0</p>
<p>The error is reproducable with the following example app:</p>
<pre><code>library(shiny)
library(shinyWidgets)
library(shinytest)


# Define UI for app that draws a histogram ----
ui &lt;- fluidPage(

  # App title ----
  titlePanel(&quot;Hello Shiny!&quot;),

  # Sidebar layout with input and output definitions ----
  sidebarLayout(

    # Sidebar panel for inputs ----
    sidebarPanel(

      # Input: Slider for the number of bins ----
      sliderInput(inputId = &quot;bins&quot;,
                  label = &quot;Number of bins:&quot;,
                  min = 1,
                  max = 50,
                  value = 30),
      colorPickr(
        inputId = &quot;color&quot;,
        label = &quot;Pick a color&quot;,
        selected = &quot;blue&quot; )



    ),

    # Main panel for displaying outputs ----
    mainPanel(

      # Output: Histogram ----
      plotOutput(outputId = &quot;distPlot&quot;)

    )
  )
)

# Define server logic required to draw a histogram ----
server &lt;- function(input, output) {

  output$distPlot &lt;- renderPlot({

    x    &lt;- faithful$waiting
    bins &lt;- seq(min(x), max(x), length.out = input$bins + 1)

    hist(x, breaks = bins, col = &quot;#007bc2&quot;, border = &quot;white&quot;,
         xlab = &quot;Waiting time to next eruption (in mins)&quot;,
         main = &quot;Histogram of waiting times&quot;)

  })

}

shinyApp(ui, server)

</code></pre>
<p>To reproduce the error, run shinytest::recordTest().</p>
<p>Thanks in advance for any help!</p>
",https://stackoverflow.com/questions/75286021/referenceerror-cant-find-variable-pickr-when-running-shinytestrecordtest,"['r', 'shiny', 'shinytest']",28,False,1,0
Set default changes/revisions to TeamCity build configuration to the changes in the latest build from a snapshot dependency,"<p>I have a build chain in TeamCity that goes A -&gt; B -&gt; C. However, I'd like to also be able to run C without rerunning A and B (by default), even if there are changes available. I can check &quot;Do not run new build if there is a suitable one&quot;, but then if there are changes available, the latest B build won't be suitable. What I really want is for C to default to the latest changes/revisions in B, which should allow C to reuse the latest suitable build of B, rather than triggering a new one off the latest changes. If someone really wants to trigger A and B by running C, they can adjust the C build to use the latest changes, but it wouldn't happen by default.</p>
<p>My specific usecase is that C is a UI testing suite. If we want to run the full build chain up to the latest changes, we have a composite build which contains B and C as snapshot dependencies. Our typical process is to run the composite build when we want to fully redeploy the services in the environment. If we're choosing to run C directly, we don't want fully redeploy the services, we just want to run the UI tests on the services that are currently running. I think that means the changes specified in C should be the latest changes in B, which would guarantee that the latest B build could be reused.</p>
<p>To clarify: I'm not looking for a solution that involves copying/duplicating build configurations. That's what we currently do, and it isn't ideal because TeamCity doesn't understand how the copied build configurations are related to each other/actually kind of the same thing. If I understand TC correctly (doubtful perhaps :p), what I'm asking for reflects most accurately what's really going on underneath- which is what I really want.</p>
<p>Thanks for any help!</p>
",https://stackoverflow.com/questions/75686385/set-default-changes-revisions-to-teamcity-build-configuration-to-the-changes-in,"['continuous-integration', 'teamcity', 'build-chain']",43,False,2,0
Unable to launch custom .NET 6 BA with WixDotNetCoreBootstrapperApplicationHost,"<p>I'm converting a WIX3/.NET4.8 installer to WIX4/.NET6. At the moment, I'm trying to see from the bundle our custom BA, which was converted to .NET6.</p>
<p>But I still get these errors on a fresh Win 11 VM, when launching the installer bundle:</p>
<pre><code>Error 0x800700c1: Failed to load hostfxr from 'C:\Windows\TEMP\{2198BC7C-AA74-4DBC-A488-F62A6AD921AE}\.ba\hostfxr.dll'.
Error 0x800700c1: Failed to load hostfxr.
Error 0x800700c1: The self-contained .NET Core runtime failed to load. This is an unrecoverable error.
</code></pre>
<p>Bundle and BA settings:</p>
<ul>
<li>the bundle use WIX 4.0.0-rc.2, and target x64</li>
<li>it has a BA with <code>&lt;bal:WixDotNetCoreBootstrapperApplicationHost  SelfContainedDeployment=&quot;yes&quot;/&gt;</code></li>
<li>the payload is harvested by heat, with the correct <code>&lt;Payload bal:BAFactoryAssembly=&quot;yes&quot; SourceFile=&quot;$(var.InstallerUIPath)\VisionMainInstallerUI.exe&quot; xmlns:bal=&quot;http://wixtoolset.org/schemas/v4/wxs/bal&quot; /&gt;</code></li>
<li>the custom BA is publish self-contained for runtime win-x86</li>
<li>the custom BA is targeting net6.0-windows/win-x86 (I discovered that x86 was still mandatory, as mbanative.dll is only x86)</li>
</ul>
<p>As I have set the BA as executable (console) I'm able to launch it and see the console message from C:\Windows\TEMP{2198BC7C-AA74-4DBC-A488-F62A6AD921AE}.ba<br />
I was previously creating a dll, but I had the same error, and the exe permit me to check that the self-contained is working and not missing anything.</p>
<p>I also tried the framework dependent solution, with installing the .NET runtime. But I get the same errors:</p>
<pre><code>The prerequisites were successfully installed. The bootstrapper application will be reloaded.
Bootstrapper application requested to be reloaded.
Error 0x800700c1: Failed to load hostfxr from 'C:\Windows\TEMP\{6D909B1C-378D-4481-96DE-DCF7ADBDBBA4}\.ba\hostfxr.dll'.
Error 0x800700c1: Failed to load hostfxr.
Error 0x81f403ea: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop.
Loading prerequisite bootstrapper application because .NET Core host could not be loaded, error: 0x81f403ea.
</code></pre>
<p>Finally, I also tried our test program, which emulate WIX for UI testing the BA: even in self-contained, without any runtime on the VM, the BA was correctly displayed.</p>
<p>Even if I struggle quite a bit to get the correct self-contained output, and the needed harvesting result, I have now a BA which is working when directly called, but WIX still don't want to start it. I now don't know what to do, as the errors messages are totally misleading (hostfxr.dll being present, and the BA is starting on its own).</p>
<h1>Update</h1>
<p>I switched again to win-x64 (for both build and publishing self-contained) and to a dll output, and I now get the errors bellow.
mbanative.dll correctly contains &quot;PE\0\0d&quot;, therefore it is the 64 bit version (Dependencies GUI x64 misleads by marking an issue on it)</p>
<p>My test application emulating WIX can also use the BA dll in x64, and the UI is displayed without issue on a VM without .NET6 runtime. It is only from the bundle itself that it isn't working.</p>
<pre><code>[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: You must install or update .NET to run this application.

App: C:\Windows\TEMP\{8521A191-8C06-4ED8-880A-4FE878955375}\.cr\visionCATS.exe
Architecture: x64
[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: .NET location: C:\Windows\TEMP\{414A222D-3B83-4894-8FC0-5AD87CF921E3}\.ba\

[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: No frameworks were found.
[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: 
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&amp;framework_version=6.0.0&amp;arch=x64&amp;rid=win10-x64
[1E3C:08BC][2023-02-08T10:23:02]e000: Error 0x80008096: HostfxrInitializeForApp failed
[1E3C:08BC][2023-02-08T10:23:02]e000: Error 0x80008096: Failed to initialize hostfxr.
[1E3C:08BC][2023-02-08T10:23:02]e000: Error 0x80008096: The self-contained .NET Core runtime failed to load. This is an unrecoverable error.
[1E3C:08BC][2023-02-08T10:23:02]i000: Loading prerequisite bootstrapper application because .NET Core host could not be loaded, error: 0x80008096.
</code></pre>
",https://stackoverflow.com/questions/75374176/unable-to-launch-custom-net-6-ba-with-wixdotnetcorebootstrapperapplicationhost,"['wix', '.net-6.0', 'wix4']",194,True,0,1
