title,body,link,tags,view_count,is_answered,score,answer_count
Running GUI Testing on bamboo agent as service,"<p>There is a way to run CI of GUI testing in bamboo agent as service on windows server?
I don't think it is possible, just run the bamboo agent as a proccess.</p>
<p>I am using puppeteer as libray to run the GUI testing on electron app.</p>
<p>any type of another solution will help :)</p>
",https://stackoverflow.com/questions/65344853/running-gui-testing-on-bamboo-agent-as-service,"['continuous-integration', 'puppeteer', 'bamboo']",244,False,0,1
JavaFX GUI testing with TestFX fails on Github workflow but not on local computer,"<p>As per title, I am using TestFX to run some simple test on the GUI of a JavaFX application. The result whenever I run gradle test, will return 340 tests passed out of 340 tests. However, on Github's workflow checks for pull requests, it says 340 tests passed, 1 failed.</p>
<pre><code>&gt; Task :test

seedu.address.ui.WidgetViewBoxTest &gt; update_matchingContent(FxRobot) FAILED
    java.lang.RuntimeException
        Caused by: java.lang.UnsupportedOperationException

340 tests completed, 1 failed

&gt; Task :test FAILED

&gt; Task :jacocoTestReport
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
&gt; There were failing tests. See the report at: file:///home/runner/work/tp/tp/build/reports/tests/test/index.html
</code></pre>
<p>Yet locally, everything is fine when I run build.</p>
<pre><code>11:43:12 PM: Executing task 'build'...

&gt; Task :compileJava UP-TO-DATE
&gt; Task :processResources UP-TO-DATE
&gt; Task :classes UP-TO-DATE
&gt; Task :jar UP-TO-DATE
&gt; Task :startScripts UP-TO-DATE
&gt; Task :distTar UP-TO-DATE
&gt; Task :distZip UP-TO-DATE
&gt; Task :shadowJar UP-TO-DATE
&gt; Task :startShadowScripts UP-TO-DATE
&gt; Task :shadowDistTar UP-TO-DATE
&gt; Task :shadowDistZip UP-TO-DATE
&gt; Task :assemble UP-TO-DATE
&gt; Task :checkstyleMain UP-TO-DATE
&gt; Task :compileTestJava UP-TO-DATE
&gt; Task :processTestResources UP-TO-DATE
&gt; Task :testClasses UP-TO-DATE
&gt; Task :checkstyleTest UP-TO-DATE
&gt; Task :test UP-TO-DATE
&gt; Task :jacocoTestReport UP-TO-DATE
&gt; Task :check UP-TO-DATE
&gt; Task :build UP-TO-DATE

BUILD SUCCESSFUL in 0s
16 actionable tasks: 16 up-to-date
11:43:13 PM: Task execution finished 'build'.
</code></pre>
<p>I cannot find any relevant issues on the TestFX github page. And the test report generated in index.html indicated 100% text success. Anybody able to provide insights into this issue?</p>
",https://stackoverflow.com/questions/64415258/javafx-gui-testing-with-testfx-fails-on-github-workflow-but-not-on-local-compute,"['javafx', 'github-actions', 'testfx']",272,False,1,0
Running GUI Testing on bamboo agent as service,"<p>There is a way to run CI of GUI testing in bamboo agent as service on windows server?
I don't think it is possible, just run the bamboo agent as a proccess.</p>
<p>I am using puppeteer as libray to run the GUI testing on electron app.</p>
<p>any type of another solution will help :)</p>
",https://stackoverflow.com/questions/65344853/running-gui-testing-on-bamboo-agent-as-service,"['continuous-integration', 'puppeteer', 'bamboo']",244,False,0,1
Trying to make a http post request and expecting response by sending a json data using VB script,"<p>we have a dashboard and it has credentials to login through.... created a json using vb script and written a simple code to post the json through a http request and trying to get response using GUI testing in UFT... please help me to get the respose text code below...
please tell me if i am missing something</p>

<pre><code>   Dim fso, outFile
    Set fso = CreateObject(""Scripting.FileSystemObject"")
    Set outFile = fso.CreateTextFile(""C:\Automation\output.txt"", True,True)
    set json = CreateObject64(""Chilkat_9_5_0.JsonObject"")

    index = -1

    success = json.AddStringAt(-1,""runnerId"",""ebd1e5e79c"")
    success = json.AddStringAt(-1,""environmentId"",""966c-7a9fd2d9e003"")
    success = json.AddStringAt(-1,""name"",""Smoketest"")
    success = json.AddStringAt(-1,""started"",""12-18-202006:03:03"")
    success = json.AddStringAt(-1,""elapsedTime"",""01:06:05"")
    success = json.AddStringAt(-1,""success"",""passed"")
    success = json.AddStringAt(-1,""scenarios"",""Createtest"")
    success = json.AddStringAt(-1,""step"",""teststep1"")

    json.EmitCompact = 0
    outFile.WriteLine(json.Emit())


    Dim objXmlHttpMain , URL

    URL=""http://10.229.49.101/"" 
    Set objXmlHttpMain = CreateObject(""Msxml2.ServerXMLHTTP"") 
    on error resume next 
    objXmlHttpMain.open ""POST"",URL, False
    objXmlHttpMain.setRequestHeader ""Content-Type"", ""application/json; charset=UTF-8"" 

    objXmlHttpMain.send outFile

    sHTTPResponse = objXmlHttpMain.responseText

    msgbox sHTTPResponse

    set objJSONDoc = nothing 
    set objResult = nothing
    outFile.Close
    Set outFile=nothing
    set json=nothing
    Set fso=nothing 
</code></pre>
",https://stackoverflow.com/questions/60832005/trying-to-make-a-http-post-request-and-expecting-response-by-sending-a-json-data,['httprequest'],116,False,0,1
Display text on screen that matches @allure.title(&#39;...&#39;) text for display during video recording of pytesting,"<p>We are using pytest and Allure for testing our software with great results. Part of our setup is video recording of the GUI testing. It would be very useful to display text of which test is currently being ran on the screen. Does any know if there is a way to display the @allure.title('...') as a title bar on the window?</p>
",https://stackoverflow.com/questions/64867342/display-text-on-screen-that-matches-allure-title-text-for-display-during,"['python', 'windows', 'pytest', 'allure']",147,True,1,1
Start application with command line argument using Dogtail on Ubuntu,"<p>I started writing automation scripts for browser using Dogtail in Ubuntu, an open source GUI testing tool and automation framework written in Python. I am invoking the browser using:</p>
<pre><code>run(&quot;firefox&quot;, appName=&quot;Firefox&quot;); // Where appName is Window Name
</code></pre>
<p>But I want to start the browser with additional command line arguments (eg: --some-args). Is there a way to do something like this?</p>
<p>Reference: <a href=""https://zmc.fedorapeople.org/dogtail/epydoc/dogtail.utils-pysrc.html"" rel=""nofollow noreferrer"">https://zmc.fedorapeople.org/dogtail/epydoc/dogtail.utils-pysrc.html</a></p>
",https://stackoverflow.com/questions/63178709/start-application-with-command-line-argument-using-dogtail-on-ubuntu,"['python', 'ubuntu']",69,True,0,1
Sikuli is unable to recognize image taken by snipping tool with the one on the screen while running auto testing,"<p>I am very new with Sikuli framework. I am trying to use Sikuli for GUI testing. I have taken the screen image shot using snipping tool for gmail login page and the same image i am using while running the test cases.
But it seems somehow, Sikuli framework is not able to match the image on the screen with below error:</p>
<pre><code>FindFailed: C:/Rohit_Work_Dir/bdd_fw_workspace/cucumberwithrobotfw/src/test/java/com/learn/sikulimpl/emailId.png: (397x82) in S(0)[0,0 1280x720] E:Y, T:3.0
  Line 2759, in file Region.java

    at org.sikuli.script.Region.wait(Region.java:2759)
    at org.sikuli.script.Region.find(Region.java:2336)
    at org.sikuli.script.Region.getLocationFromTarget(Region.java:3213)
    at org.sikuli.script.Region.click(Region.java:3698)
    at org.sikuli.script.Region.keyin(Region.java:4366)
    at org.sikuli.script.Region.type(Region.java:4328)
    at com.learn.sikulimpl.LoginGmailAccountSteps.loginToGEAccount(LoginGmailAccountSteps.java:58)
</code></pre>
<p>NOTE:</p>
<ul>
<li><p>I am using eclipse as IDE for the testing.</p>
</li>
<li><p>I have created maven project with Sikula api version along with Selenium:</p>
<pre><code>   &lt;dependency&gt;
         &lt;groupId&gt;com.sikulix&lt;/groupId&gt;
         &lt;artifactId&gt;sikulixapi&lt;/artifactId&gt;
         &lt;version&gt;1.1.1&lt;/version&gt;
         &lt;exclusions&gt;
             &lt;exclusion&gt;
                 &lt;groupId&gt;com.github.vidstige&lt;/groupId&gt;
                 &lt;artifactId&gt;jadb&lt;/artifactId&gt;
             &lt;/exclusion&gt;
         &lt;/exclusions&gt;
     &lt;/dependency&gt;
</code></pre>
</li>
</ul>
",https://stackoverflow.com/questions/63370526/sikuli-is-unable-to-recognize-image-taken-by-snipping-tool-with-the-one-on-the-s,"['sikuli', 'sikuli-x']",349,False,0,1
Skip Rows in Data Source(CSV) in MSTest,"<p>I am creating an Automated data-driven GUI testing project for my .Net WebApp using MSTest and Selenium. I am using CSV file as a data source for the test methods. The WebApp has multiple user level and currently I am maintaining different csv files for different user levels. This is not feasible when scaling and adding new test methods.</p>

<p>I want the CSV file to be divided in different sections as per the user rows e.g</p>

<pre><code>#Admin
Row1
Row2

#Client
Row1
Row2
</code></pre>

<p>Is there any way that when Datasource is reading the data, it starts the data reading according to a specified user level? I have only stared coding a couple months ago and if there is any better way to achieve this, I am all ears.     </p>
",https://stackoverflow.com/questions/59979505/skip-rows-in-data-sourcecsv-in-mstest,"['c#', 'selenium', 'mstest']",57,False,2,0
How can I run integration tests on a JNI Android library?,"<p>I need to run integration tests for an Android library that leverages native
code via JNI. This has a few implications:</p>
<ul>
<li>This is a library, and as such has no GUI whatsoever. This means that test
frameworks like Espresso, Appium and the like are of no use, since there's no
GUI to test against.</li>
<li>This gives me some headaches with popular cloud services like App Center and
Firebase Test Lab, as they require both an UI instrumented test apk, written
with one of the supported UI testing frameworks, and an app apk to run these
tests against.</li>
<li>As said, the library contains C code loaded via JNI. Unfortunately, this
excludes the possibility of using Robolectric, since it doesn't support JNI.</li>
</ul>
<p>Now there are a few questions:</p>
<ul>
<li>Are there any Android simulation testing frameworks that support JNI?</li>
<li>Is there a cloud service out there which allows me to simply run a pre-built
Android instrumented unit tests apk, without any UI instrumented test
framework and without an actual app to be tested?</li>
<li>Have I missed a much simpler solution to my problem?</li>
</ul>
<p>The problem with cloud services is that currently I only have an instrumented
unit test apk, which as such has no actual GUI testing. Furthermore, that's the
sole apk I have, since there's no actual Android app to be tested.</p>
<p>I am not aware of any Android mocking test frameworks, like Robolectric, that
support JNI, which is why I am looking into instrumented tests, on real or
emulated Android devices, in the first place.</p>
",https://stackoverflow.com/questions/62897502/how-can-i-run-integration-tests-on-a-jni-android-library,"['android', 'c++', 'testing', 'android-ndk', 'java-native-interface']",178,False,2,0
Creating delay between GUI updates,"<p>I am attempting to create a sorting visualizer in Java using Swing. So far, my program asks the user for the sorting algorithm of their choice (I have excluded the code for selection menu here) and then visually sorts an unsorted array. The only sorting algorithm that I have implemented so far for GUI testing purposes is insertion sort.</p>

<p>Below is the insertion sort algorithm: </p>

<pre><code>public class InsertionSort extends Sorter { // Sorter is an abstract class
    @Override
    public void sort(ArrayVisualization array) { // ArrayVisualization object to change array values
        for (int i = 0; i &lt; array.getArraySize(); i++) {
            int j = i - 1;
            int key = array.getArrayValue(i);
            while (j &gt;= 0 &amp;&amp; array.getArrayValue(j) &gt; key) {
                array.delayedSwap(j, j+1); // calls delayedSwap method continually-PROBLEM
                --j;
            }
        }
    }

    @Override
    public String toString() {
        return ""Insertion Sort"";
    }
}
</code></pre>

<p>I am unable to correctly visualize the swaps between the various indices. At first, I attempted using <code>Thread.sleep()</code> to briefly put the thread to sleep when swapping values. This inevitably ended up freezing the EDT. After searching through Stack Overflow, I came across Swing Timer which is recommended when making GUI modifications. </p>

<p>When I used Swing Timer for <strong>shuffling</strong> the array in <code>shuffleArray()</code>, it worked perfectly fine and I could see each value being swapped with a delay (currently, the portion in <code>shuffleArray()</code> that used Swing Timer is commented because I decided later to not to show the shuffling part with delays). When I implemented the <code>delayedSwap()</code> method in a similar fashion with Swing Timer, the array slightly sorted itself but then suddenly stopped. The array remains unsorted as a whole. </p>

<p><code>delayedSwap()</code> is called appropriate number of times and the insertion sort algorithm works perfectly fine as well when tested without Swing Timer.</p>

<p>Can someone please tell me why am I having this issue with Swing Timer in <code>delayedSwap()</code>?  I have tried using <code>SwingWorker</code> and creating a new thread in <code>delayedSwap()</code> and then putting that to sleep. I kind of think it has something to do with me calling <code>delayedSwap()</code> repeatedly in a loop from another class but I do not understand how else to implement <code>delayedSwap()</code> as that is used in all sorting algorithms (roughly). If this is not fixable, is there any other alternative?</p>

<p>Below is the code for the <code>ArrayVisualizer</code> which contains <code>delayedSwap()</code>.</p>

<pre><code>import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;

public class ArrayVisualization extends JPanel {
    private int[] array;
    private static final int BAR_WIDTH = 5;
    private final static int WIN_WIDTH = 1280;
    private final static int WIN_HEIGHT = 720;
    private static final int NUM_BARS = WIN_WIDTH / BAR_WIDTH;
    //private static final int SWAP_DELAY = 1;


    public void arrayScreen() {
        JFrame frame = new JFrame(""Sorting Visualizer"");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        frame.setLayout(new BorderLayout());

        ArrayVisualization panel = new ArrayVisualization();
        frame.add(panel);

        frame.setSize(WIN_WIDTH, WIN_HEIGHT);
        frame.setVisible(true);
        frame.setResizable(false);
        frame.setLocationRelativeTo(null);
    }

    public int getArraySize() {
        return this.array.length;
    }

    public int getArrayValue(int x) {
        return this.array[x];
    }

    public ArrayVisualization() { 
        array = new int[NUM_BARS];
        for (int i = 0; i &lt; NUM_BARS; i++) { // populate the array
            array[i] = i;
        }
        shuffleArray(); // shuffle
        InsertionSort sort = new InsertionSort();
        sort.sort(this); // sort
    }

    public void shuffleArray() {
        Random rand = new Random();

        for (int i = 0; i &lt; NUM_BARS; i++) {
            int randIdx = rand.nextInt(NUM_BARS - 1); // create random indices to swap with
            int temp = array[randIdx];
            array[randIdx] = array[i];
            array[i] = temp;
        }
        repaint(); 

 /*       Timer timer = new Timer(1, new ActionListener() {
            private int counter;

            @Override
            public void actionPerformed(ActionEvent e) {
                int randomNumber = rand.nextInt(NUM_BARS - 1);

                int temp = array[counter];
                array[counter] = array[randomNumber];
                array[randomNumber] = temp;
                repaint();
                if (counter == NUM_BARS - 1) {
                    ((Timer)e.getSource()).stop();
                }
                counter++;
            }
        });
        timer.start();*/
    }

/* MAIN PROBLEM */
    public void delayedSwap(int idx1, int idx2) {
        Timer timer = new Timer(1000, new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {

                int temp = array[idx1];
                array[idx1] = array[idx2];
                array[idx2] = temp;
                repaint();
                ((Timer) e.getSource()).stop(); // so that timer terminates after 1 swap
            }
        });
        timer.start();
    }


    @Override
    public void paintComponent(Graphics g) {
        Graphics2D graphics = (Graphics2D) g;
        super.paintComponent(graphics);


        graphics.setColor(Color.BLACK);
        for (int i = 0; i &lt; NUM_BARS; i++) {
            int height = array[i] * 2;
            int xBegin = i + (BAR_WIDTH - 1) * i;
            int yBegin = WIN_HEIGHT - height;

            graphics.fillRect(xBegin, yBegin, BAR_WIDTH, height);
        }
    }
}
</code></pre>

<p>Thank you!</p>
",https://stackoverflow.com/questions/62245062/creating-delay-between-gui-updates,"['java', 'swing', 'timer']",38,True,2,1
Set toolpath to MSBuild 2019 in a TFS 2013 using (XALM) build process templates,"<p>TL;DR: Clean Windows build server, MS Build Tools 2019 and TFS 2013 installed.
Build Logs says <em>Exception Message: File not found: MSBuild.exe (type FileNotFoundException)</em></p>
<p><strong>How Do I setup MSBUILD toolpath in a XAML file on TFS 2013, configured to use MSBuild 2019 with a Visual Studio 2019 Enterprise installed on my dev box.</strong></p>
<ul>
<li>Please provide FULL XAML file that WORKS with TFS2013 (update 3) with an explicit custom msbuild path.</li>
</ul>
<p>A Bit more info:</p>
<p>We have a multi server setup for our TFS build routines running version 2013.</p>
<p>One controller and a few agent servers here and there, nothing fancy.
Recently I added yet another for GUI Testing - I need the agent service to be in Interactive mode.</p>
<p><strong>Steps so far:</strong></p>
<p>Installed TFS 2013 including two agents - linking to the main controller.
I install Build Tools version 2019
I added tags to control the build destribution.</p>
<p>Activated a build and the rest is history.</p>
<p>I'm four (frustrating) days in on this - I've read every Stack Overflow TFS <em>set toolpath</em> entry I can find, and a huge bunch of odd forums, yet none seems to scratch my itch here.</p>
<ul>
<li>I even added both paths you see further down, to the Windows environment PATH variable. Im not sure that does anything anymore.</li>
</ul>
<p>See; Everybody talks about this entry in the XAML that says <em>toolpath</em> (or similar) - but; I dont see it. We use a minor changed version of a TfvcTemplate.12.Xaml.</p>
<p>Many also talk about this GUI tool for editing XALM files, where I get to see all the different options available (I presume) - can someone help me with this too? Its certainly not working out of the box with a 2019 Enterprise????
So; I installed this <a href=""https://marketplace.visualstudio.com/items?itemName=ms-devlabs.msdevlabs-pte"" rel=""nofollow noreferrer"">Extension Process Template Editor</a>, but of course nothing happens when I click a XAML file, just more XML :)</p>
<p>I now have a few added paths on the new server, where I see instances of msbuild.exe installed (MS/.NET get your act together, please)</p>
<pre><code>C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin
C:\Program Files (x86)\MSBuild\12.0\Bin
</code></pre>
<p>Please try not to write this off as a duplicate at first glance. I know its similar to other questions - however; Devil is in the details.</p>
",https://stackoverflow.com/questions/62775886/set-toolpath-to-msbuild-2019-in-a-tfs-2013-using-xalm-build-process-templates,"['c#', '.net', 'tfs', 'msbuild', 'visual-studio-2019']",1491,True,2,2
