title,body,link,tags,view_count,is_answered,score,answer_count
End to End testing for Multipart data,"<p><strong>I have working REST API in Loopback framework. In that I have POST method where I am accepting one payload and 3 different files. Code looks like this</strong> </p>

<pre><code>@post(""/v1/api/order"", {
    responses: {
      200: {
        content: {
          ""application/json"": { schema: { ""x-ts-type"": Order } },
          ""multipart/mixed"": {
            ""x-parser"": ""stream"",
            schema: { type: ""object"" }
          }
        },
        description: ""Order model instance""
      }
    }
  })

  public async createOrder(
    @requestBody({
      content: {
        ""multipart/form-data"": {
          ""x-parser"": ""stream"",
          schema: { type: ""object"" }
        }
      },
      description: ""multipart/form-data value."",
      required: true
    })
    request: Request,
    @inject(RestBindings.Http.RESPONSE) response: Response): Promise&lt;any&gt; {
    this.logger.info(`createOrder`, { userId: ""loggedOn User"", method: ""createOrder"" });


    const fileUpload = new FileUploader();
    const aHelper = new AttachmentHelper();

    const results: any = await fileUpload
      .multerFileUpload(request, response)
      .then((result: any) =&gt; {

        return {
          attachmentDetails: aHelper.attachmentInformation(result),
          orderDetails: _.get(result.fields, ""payload"")
        };
      })
      .catch((err: Error) =&gt; {
        response.status(400);
        this.logger.error(""createOrder"", err.stack, ""error occured while create order"");
        throw err;
      });
</code></pre>

<p><strong>I am writing End to End testing but not able to send payload using send method. I am using testlab. Can anyone please suggest how to write test case for this.</strong></p>

<pre><code>it.only('Insert the order', async () =&gt; {
        const neworder = givenNewOrderPayload();

        console.log(""New Order Payload."", neworder);

        await client.post(`/v1/api/order`)
        .set('Content-Type', 'multipart/form-data')
        .set(neworder)
        .expect(200)
}



 function givenNewOrderPayload() {
        let userInput = a;
        return {'payload': userInput}
    }
</code></pre>

<p><strong>I am expecting data to be inserted in database with 200 status code.
Actual Result: 400 Bad Request</strong></p>
",https://stackoverflow.com/questions/55813118/end-to-end-testing-for-multipart-data,"['typescript', 'loopback']",515,True,0,1
Change port for nativescript end to end testing,"<p>I'm using NativeScript 6.1.2 with Appium to run End to End tests using the Android emulator. I have a requirement to run the appium tests on a different port than the default (5546) as it's colliding with another user on the same machine trying to do the same tests.</p>

<p>I've setup an Android Virtual Device with the following capabilities in the appium.capabilities.json file;</p>

<pre><code>""samsung"": {
    ""platformName"": ""Android"",
    ""platformVersion"": ""7.0"",
    ""deviceName"": ""samsung_galaxy_s8"",
    ""avd"": ""samsung_galaxy_s8"",
    ""lt"": 60000,
    ""newCommandTimeout"": 720,
    ""noReset"": false,
    ""fullReset"": false,
    ""app"": """"
}
</code></pre>

<p>When I start the tests with;</p>

<pre><code>npm run e2e -- --runType samsung
</code></pre>

<p>I get the following;</p>

<pre><code>Executing ""/bin/ps aux | grep -ie 'sdk/emulator/qemu' | grep -ie 'samsung_galaxy_s8' | grep -v grep  | xargs kill -9""
No matching processes to kill!
Starting emulator with options: -avd samsung_galaxy_s8 -port 5546 [""-no-audio"",""-no-boot-anim"",""-wipe-data"",""-no-snapshot-load"",""-no-snapshot-save""]
Booting emulator ...
Check if ""emulator-5546"" is running.
Check has ""passed"".
Check if emulator is responding
Emulator is booted!
Started device:   {""name"":""samsung_galaxy_s8"",""apiLevel"":""24"",""releaseVersion"":""7.0"",""platform"":""android"",""type"":""emulator"",""status"":""booted"",""token"":""5546"",""pid"":26944,""startedAt"":1572236203683,""config"":{""density"":1.6,""offsetPixels"":25}}
</code></pre>

<p>NOTE: The ""-avd samsung_galaxy_s8 -port 5546"" line there is what I want to change.</p>

<p><strong>Update</strong></p>

<p>I found where appium starts the process and that the port is set by using the attribute 'token' on the emulator object.</p>

<p>This is in the /node_modules/mobile-devices-controller/lib/android-controller.js file;</p>

<pre><code>static startEmulatorProcess(emulator, logPath, options) {
    return __awaiter(this, void 0, void 0, function* () {
        options = options || [""-no-audio"", ""-no-snapshot-save"", ""-no-boot-anim""];
        if (logPath) {
            options.push(` &gt; ${logPath} 2 &gt;&amp; 1`);
        }
        utils_1.logInfo(`Starting emulator with options: -avd ${emulator.name} -port ${emulator.token}`, options);
        const process = child_process_1.spawn(AndroidController.EMULATOR, ["" -avd "", emulator.name, "" -port "", emulator.token, ...options], {
            shell: true,
            detached: false,
        });
        process.stdout.on(""data"", (data) =&gt; {
            console.log(data.toString());
        });
        process.stdout.on(""error"", (data) =&gt; {
            console.log(data.toString());
        });
        emulator.pid = process.pid;
        emulator.process = process;
        return emulator;
    });
}
</code></pre>

<p>Where do I set this token? It's current set to 5546.</p>

<p><strong>Update: Full commands I used as per WiRa's answer</strong></p>

<p>Start emulator</p>

<pre><code>${ANDROID_HOME}emulator/emulator -avd samsung_galaxy_s8 -gpu guest -no-audio -verbose -port 3500
</code></pre>

<p>Start e2e tests</p>

<pre><code>DEVICE_TOKEN=3500 npm run e2e -- --runType device.samsung
</code></pre>

<p>NOTE: Because of the constant crashing of the emulator I also use a loop</p>

<pre><code>while true; do pkill -f android; sleep 2; tnsa &amp;; em &amp;&gt; ~/emulator.log; done
</code></pre>
",https://stackoverflow.com/questions/58585745/change-port-for-nativescript-end-to-end-testing,"['android', 'appium', 'nativescript', 'emulation', 'e2e-testing']",155,True,3,1
How to end-to-end testing a react native app?,"<p>I have a react NATIVE app I would like to test in a end-to-end way. First, do you know if Cypress can do it ? I'm really not sure of it but in doubt I ask anyway. Second, I've seen Detox can do it but I have a Windows environment and it seems Detox is only supported by Mac or Linux. Do you have any solutions for my problem ?</p>

<p>Thanks in advance.</p>
",https://stackoverflow.com/questions/57768294/how-to-end-to-end-testing-a-react-native-app,"['windows', 'react-native', 'cypress', 'detox']",8054,True,8,3
End to end testing implementation for Visual Studio Code extension,"<p>I have developed a Visual Studio code extension. i want to implement end to end testing for each Command we configure in package.json. these commands have Quickpicks etc</p>

<p>i am not sure how to implement tests</p>
",https://stackoverflow.com/questions/54745072/end-to-end-testing-implementation-for-visual-studio-code-extension,"['visual-studio-code', 'e2e-testing', 'vscode-extensions']",305,False,5,1
End to end testing using protractor failing because of chrome driver,"<p>3 days ago our end-to-end protractor tests were using the version 2.45 of the chrome. Since yesterday, protractor is using the version 2.46 and our tests are failing:</p>

<blockquote>
  <p>[INFO] [21:16:41] I/downloader - curl -o/var/lib/jenkins/workspace/risk-score-frontend/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.46.zip <a href=""https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip"" rel=""nofollow noreferrer"">https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip</a>
  [INFO] [21:16:41] I/update - chromedriver: unzipping chromedriver_2.46.zip
  [INFO] [21:16:41] I/update - chromedriver: setting permissions to 0755 for /var/lib/jenkins/workspace/risk-score-frontend/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.46
  [INFO] [21:16:42] I/launcher - Running 1 instances of WebDriver
  [INFO] [21:16:42] I/direct - Using ChromeDriver directly...
  [INFO] [21:16:42] E/launcher - session not created: Chrome version must be between 71 and 75
  [INFO]   (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.4.0-1013-aws x86_64)
  [INFO] [21:16:42] E/launcher - SessionNotCreatedError: session not created: Chrome version must be between 71 and 75</p>
</blockquote>

<p>The machine hosting jenkins is a ubuntu with chrome version 70.0.3538.110-0ubuntu0.16.04.1</p>

<p>How can I force protractor to use version 2.45 until I find a way to upgrade chrome?</p>

<p>Thanks!</p>
",https://stackoverflow.com/questions/54768889/end-to-end-testing-using-protractor-failing-because-of-chrome-driver,"['angular', 'jenkins', 'protractor']",6964,True,2,3
How to test APIs in an end to end testing flow in front-end application?,"<p>We have encountered a problem in our application, that sometimes specific flows in our application break due to the lack of request data or mismatch in the API contract. </p>

<p>We have been using <a href=""http://nightwatchjs.org"" rel=""nofollow noreferrer"">Nightwatch Js</a> for end to end flow testing. </p>

<p>So my problem statement is the following:</p>

<p><strong>We need a way to check whether the service calls made from the application have the required data for successful data retrieval from the APIs.</strong></p>

<p><strong>So, there will be a configuration for each service calls</strong> (The data structure of the request needed for that specific service call and the same for the expected response), <strong>and when the end to end flow testing</strong> ( Browser automated testing ) <strong>is going on, each specified network call will be checked with the earlier mentioned configuration to determine it's success or failure and is the reason being any mismatch or absence of data from fronend.</strong> </p>

<p>Also, it should report it in a proper way in files. It will be really great if <strong><em>there is any way that we can do it in Nightwatch itself</em></strong>, or <strong>there is any framework for this specific use-case</strong>. </p>
",https://stackoverflow.com/questions/54210618/how-to-test-apis-in-an-end-to-end-testing-flow-in-front-end-application,"['javascript', 'api', 'frontend', 'nightwatch.js', 'e2e-testing']",819,False,0,1
Is it possible to use to use the DOM Testing library to do end to end testing for react applications,"<p>I am working on writing end to end tests for a react application using Selenium and Protractor. I was wondering if there is a way to use the Testing library to access elements from the DOM (in a real browser). </p>
",https://stackoverflow.com/questions/58635558/is-it-possible-to-use-to-use-the-dom-testing-library-to-do-end-to-end-testing-fo,"['reactjs', 'selenium-webdriver', 'protractor', 'react-testing-library']",215,True,0,1
How to remove focus in stenciljs E2E testing,"<p>In end-to-end testing using newE2EPage from stenciljs you can invoke focus() on an element to set focus on the element:</p>

<pre><code>   const page = await newE2EPage({html: `&lt;my-component&gt;&lt;/my-component&gt;`});
   const el = await page.find('my-component');
   await el.focus();
</code></pre>

<p>How do you remove focus from the element?</p>

<p>P.S. I've tried setting focus on a second element but this does not seem to work.</p>

<p>P.P.S. page.find() is how you do querySelector on an E2EPage from Stencil newE2EPage.  Documentation is at: <a href=""https://stenciljs.com/docs/end-to-end-testing#find-an-element-in-the-shadow-dom"" rel=""nofollow noreferrer"">https://stenciljs.com/docs/end-to-end-testing#find-an-element-in-the-shadow-dom</a></p>
",https://stackoverflow.com/questions/56926816/how-to-remove-focus-in-stenciljs-e2e-testing,"['javascript', 'puppeteer', 'e2e-testing', 'stenciljs']",617,True,1,1
Why do I need Protractor when I have Cucumber and Selenium?,"<p>We use Angular for front end development and Java for backend development. We use Cucumber and Selenium for BDD and end to end testing. I have recently read about Protractor and I came to know it can be used for end to end testing. But I am not understanding why do I need it when I already have Cucumber and Selenium. Can somebody please help me understand what is the use of Protractor when I already have Cucumber and Selenium? 
Thanks in Advance. </p>
",https://stackoverflow.com/questions/59449475/why-do-i-need-protractor-when-i-have-cucumber-and-selenium,"['angularjs', 'selenium', 'protractor', 'cucumber', 'gherkin']",1466,True,2,3
End to end testing implementation for Visual Studio Code extension,"<p>I have developed a Visual Studio code extension. i want to implement end to end testing for each Command we configure in package.json. these commands have Quickpicks etc</p>

<p>i am not sure how to implement tests</p>
",https://stackoverflow.com/questions/54745072/end-to-end-testing-implementation-for-visual-studio-code-extension,"['visual-studio-code', 'e2e-testing', 'vscode-extensions']",305,False,5,1
Is it possible to control input processing time with scio JobTest?,"<p>We are using com.spotify.scio.testing.JobTest for end to end testing of our scio pipeline. The pipeline includes a DoFn that is sensitive to data sequencing, on a stream of configuration data which arrives infrequently. </p>

<p>We are passing an ordered List of configuration values <code>combinedSampleConfig</code> as input to the JobTest Builder. Is there a way to have JobTest preserve the ordering of this CustomIO input stream when we run an end to end test?</p>

<p>I see that the testing framework enables fine control over source arrival time (using <code>advanceProcessingTime</code>) when testing individual components, but do not see how to apply this for end to end testing using JobTest.</p>

<pre class=""lang-scala prettyprint-override""><code>    JobTest[MyApp.type]
      .args(commonArgs ++ Seq(
        ""--numWorkers=1"",
        ""--maxNumWorkers=1"",
      ): _*
      )
      .input(CustomIO[PubsubMessage](CONFIG_ID), combinedSampleConfig)
      .input(CustomIO[IndicatorEntry](INPUT_ID), sampleInput)
      .output(CustomIO[EnrichedIndicatorEntry](AGG_ID)) {
        _ should containInAnyOrder (expectedAggs)
      }
      .output(CustomIO[EnrichedIndicatorEntry](EVENT_ID)) {
        _ should containInAnyOrder (expectedEvents)
      }
      .run()
</code></pre>
",https://stackoverflow.com/questions/55763770/is-it-possible-to-control-input-processing-time-with-scio-jobtest,['spotify-scio'],93,False,0,1
How do I have the cli add an e2e folder for my app?,"<p>I would like to do end-to-end testing with my Angular5/ionic3 app but I notice there is no e2e folder in it.  What do I need to do to use the <code>cli</code> to generate a <code>e2e</code> folder so I can begin writing my <code>e2e</code> tests?</p>
",https://stackoverflow.com/questions/57739965/how-do-i-have-the-cli-add-an-e2e-folder-for-my-app,"['angular5', 'ionic4', 'angular-e2e']",1096,False,0,1
How to configure Jest spec reporter for Protractor in Angular 8?,"<p>For end-to-end testing in Angular, I would like to try out Protractor with Jest for Angular 8. In the configuration file <strong>protractor.conf.js</strong>, spec reporter of Jasmine is defined by default:</p>

<pre><code>const { SpecReporter } = require('jasmine-spec-reporter');

/**
 * @type { import(""protractor"").Config }
 */
exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    './src/**/*.e2e-spec.ts'
  ],
  capabilities: {
    browserName: 'chrome'
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
  },
  onPrepare() {
    require('ts-node').register({
      project: require('path').join(__dirname, './tsconfig.json')
    });
    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
  }
};
</code></pre>

<p>My question is, how can I configure similarly like this, but for Jest?</p>
",https://stackoverflow.com/questions/58986712/how-to-configure-jest-spec-reporter-for-protractor-in-angular-8,"['protractor', 'angular8', 'e2e-testing', 'ts-jest']",465,False,0,0
Can Redux DevTools be used to automate integration testing across a list of URLs or Actions?,"<p>Are there any good resources for using Redux DevTools for integration / end-to-end testing? </p>

<p>I see their Slider can replay events and Dispatcher executes just about anything. Can it somehow loop over a config file to replay common user flows on the site, and record the state changes along the way?</p>

<p><a href=""https://i.stack.imgur.com/SD6XP.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/SD6XP.png"" alt=""f ""></a></p>
",https://stackoverflow.com/questions/58180163/can-redux-devtools-be-used-to-automate-integration-testing-across-a-list-of-urls,"['reactjs', 'redux', 'automated-tests', 'integration-testing', 'redux-devtools']",86,False,2,0
end to end or integration or system testing,"<p>What kind of testing is this? Is the following considered end to end testing or is it an integration testing or a system testing? If not if you can elaborate on the types of testing in context of the code example.</p>

<p>I'm basically calling the endpoint on localhost and asserting on the status/output.</p>

<pre><code>let assert = require(""assert"");
let http = require(""http"");

describe(""EndToEndTesting"", function() {

    describe(""GET /users"", function() {
        it(""should return list of users"", function(done) {
            http.request({
                method: ""GET"",
                hostname: ""localhost"",
                port: 3000,
                path: ""/users""
            }, function(response){
                let buffers = [];
                response.on(""data"", buffers.push.bind(buffers));
                response.on(""end"", function(){
                    let body = JSON.parse(Buffer.concat(buffers).toString());
                    assert(response.statusCode == 200);
                });
            }).on(""error"", console.error).end();
        });
    }
}
</code></pre>
",https://stackoverflow.com/questions/58621937/end-to-end-or-integration-or-system-testing,"['node.js', 'testing', 'integration-testing', 'end-to-end', 'system-testing']",797,True,2,1
Adding third-party cookie exception to Cypress configuration,"<p>Using Cypress, JavaScript end to end testing framework, is there a supported mechanism to add a third-party cookie exception, or some other Chromium preference (or Electron/ if not using e.g. <code>--browser chromium</code>)?</p>

<p>I have found a mechanism to do this but it involves wrapping the browser executable, effectively a man-in-the-middle between Cypress and the ""browser"" binary.</p>
",https://stackoverflow.com/questions/58617178/adding-third-party-cookie-exception-to-cypress-configuration,"['javascript', 'testing', 'cookies', 'automated-tests', 'cypress']",1027,False,1,1
I have problem in using the drag function in testcafe,"<p>I am using testcafe for my end to end testing. I am currently testing my slider component and use the drag function, but for some reason it is not moving even though it shows the cursor moving.</p>

<p>This is my rough code:</p>

<pre><code>const slider = Selector('#slider');
const sliderThumb = Selector('#slider-thumb');

test('Dragging Slider', async t =&gt; {
    await t
        .expect(slider.value).eql('50')
        .drag(sliderThumb, 30, 0)
        .expect(slider.value).eql('70');
});
</code></pre>

<p>I expect the slider thumb to move, but it is not moving. Any tips will be appreciated, thanks!</p>
",https://stackoverflow.com/questions/56178049/i-have-problem-in-using-the-drag-function-in-testcafe,"['drag-and-drop', 'automated-tests', 'e2e-testing', 'web-testing', 'testcafe']",1394,True,4,1
When should one use element.isPresent() over ExpectedConditions.presenceOf(element)?,"<p>While end-to-end testing our app, I am often waiting for a state transition (a modal to close, a button to appear, etc). Blind experimentation has led me to sometimes use <code>browser.wait(ExpectedConditions.presenceOf(someElement)</code>, and other times use <code>browser.wait(someElement.isPresent())</code>. </p>

<p>To me, the names imply they're interchangeable. But it isn't so. Is there something about the situations in which I use these that will help me tell which to use when?</p>
",https://stackoverflow.com/questions/55049961/when-should-one-use-element-ispresent-over-expectedconditions-presenceofeleme,['protractor'],351,True,3,2
Should cypress npm package be installed locally?,"<p>I'm building  a CI/CD pipeline for end to end testing where devs would use multiple instances of cypress, in different servers and well local env. To avoid installation problems , as well version conflicts should the npm packages installed local or global? or should they be already installed in repository but defined versions in json package then all the person needs to do is clone and run?</p>
",https://stackoverflow.com/questions/58413082/should-cypress-npm-package-be-installed-locally,"['npm', 'cypress']",1100,False,2,1
Settings test data attributes as anchors in react application in testing environment,"<p>I am using the <a href=""https://nightwatchjs.org/"" rel=""nofollow noreferrer"">nightwatch</a> for end-to-end testing my application. At the same time I use CSS modules within build, what does not allow me to link css-selectors to some constants in the test code:</p>

<pre><code>module.exports = {
    url() {
        return this.api.launchUrl`;
    },
    elements: {
        reactComponent: {
            selector: '?',
        },
    },
};
</code></pre>

<p>Is there a convenient way/approach to assign some sort of <code>test-id=*</code> attributes to the react components automatically in the react project (depending on environment mode) or should I do this work explicitly?</p>
",https://stackoverflow.com/questions/58862382/settings-test-data-attributes-as-anchors-in-react-application-in-testing-environ,"['css', 'reactjs', 'webpack', 'nightwatch.js']",242,False,0,1
Nightwatch + webpack dev server + bitbucket pipelines,"<p>I am trying to get end to end testing working in our bitbucket pipeline environment using nightwatch.js, we have hit a problem. How can we keep the dev server running and run the tests referencing the dev server.</p>

<p>This isn't a problem on our local machine since I can run two windows. Though I haven't found a way to emulate this in bitbucket pipelines. Any ideas, articles or pointers for how to achieve this?</p>

<p><em>bitbucket-pipelines.yml</em></p>

<pre><code>image: atlassian/default-image:2
pipelines:
  default:
    - step:
    name: NewHomePageNav
    script:
      - npm install
      - npm test
</code></pre>

<p><em>nightwatch.config.js</em></p>

<pre><code>module.exports = {
""src_folders"": [
    ""test/Testinprogress"",
],
""page_objects_path"": ""./dist/"",
""webdriver"": {
    ""start_process"": true,
    ""server_path"": ""node_modules/.bin/chromedriver"",
    ""cli_args"": [
        ""--verbose""
    ],
    ""port"": 9515
},

""test_workers"": {
    ""enabled"": true,
    ""workers"": ""auto""
}, 

""output_folder"": ""reports"", // reports (test outcome) output by nightwatch

""test_settings"": {
    ""launch_url"" : ""http://localhost:8080""
    ""default"": {
        ""skip_testcases_on_fail"": false,
        ""globals"": {
            ""waitForConditionTimeout"": 5000 // sometimes internet is slow so wait.
        },
        ""desiredCapabilities"": {
            ""browserName"": ""chrome"",
            ""acceptSslCerts"": true,
            ""acceptInsecureCerts"": true,
            ""javascriptEnabled"": true,
            ""chromeOptions"": {
                ""args"": [
                    ""--no-sandbox"",
                    ""--headless"",
                ]
            },
            ""loggingPrefs"": {
                ""driver"": ""INFO"",
                ""server"": ""OFF"",
                ""browser"": ""INFO""
            }
        }
    }
}
}
</code></pre>
",https://stackoverflow.com/questions/55122342/nightwatch-webpack-dev-server-bitbucket-pipelines,"['webpack', 'webpack-dev-server', 'nightwatch.js', 'bitbucket-pipelines']",697,True,4,2
Test dependency for Selenium tests,"<p>I need to execute tests in specific order (Login, Go to menu, Open form, do several tests). Back in 2014 we used TestNg <a href=""https://dzone.com/articles/testng-depedency-test-%E2%80%93"" rel=""nofollow noreferrer"">method dependency</a>. This is very important feature for end-to-end testing. JUnit 5 has only <a href=""https://examples.javacodegeeks.com/core-java/junit/junit-fixmethodorder-example/"" rel=""nofollow noreferrer"">@FixMethodOrder</a> which is less powerful. I like JUnit more and on the other hand I'm missing some JUnit features in TestNg, for instance <a href=""https://github.com/junit-team/junit4/wiki/rules"" rel=""nofollow noreferrer"">@Rule</a>. I there some workaround for method dependency in JUnit or should I use TestNg again?</p>
",https://stackoverflow.com/questions/55830689/test-dependency-for-selenium-tests,"['selenium-webdriver', 'testng', 'junit5']",404,True,2,1
End to End testing for Multipart data,"<p><strong>I have working REST API in Loopback framework. In that I have POST method where I am accepting one payload and 3 different files. Code looks like this</strong> </p>

<pre><code>@post(""/v1/api/order"", {
    responses: {
      200: {
        content: {
          ""application/json"": { schema: { ""x-ts-type"": Order } },
          ""multipart/mixed"": {
            ""x-parser"": ""stream"",
            schema: { type: ""object"" }
          }
        },
        description: ""Order model instance""
      }
    }
  })

  public async createOrder(
    @requestBody({
      content: {
        ""multipart/form-data"": {
          ""x-parser"": ""stream"",
          schema: { type: ""object"" }
        }
      },
      description: ""multipart/form-data value."",
      required: true
    })
    request: Request,
    @inject(RestBindings.Http.RESPONSE) response: Response): Promise&lt;any&gt; {
    this.logger.info(`createOrder`, { userId: ""loggedOn User"", method: ""createOrder"" });


    const fileUpload = new FileUploader();
    const aHelper = new AttachmentHelper();

    const results: any = await fileUpload
      .multerFileUpload(request, response)
      .then((result: any) =&gt; {

        return {
          attachmentDetails: aHelper.attachmentInformation(result),
          orderDetails: _.get(result.fields, ""payload"")
        };
      })
      .catch((err: Error) =&gt; {
        response.status(400);
        this.logger.error(""createOrder"", err.stack, ""error occured while create order"");
        throw err;
      });
</code></pre>

<p><strong>I am writing End to End testing but not able to send payload using send method. I am using testlab. Can anyone please suggest how to write test case for this.</strong></p>

<pre><code>it.only('Insert the order', async () =&gt; {
        const neworder = givenNewOrderPayload();

        console.log(""New Order Payload."", neworder);

        await client.post(`/v1/api/order`)
        .set('Content-Type', 'multipart/form-data')
        .set(neworder)
        .expect(200)
}



 function givenNewOrderPayload() {
        let userInput = a;
        return {'payload': userInput}
    }
</code></pre>

<p><strong>I am expecting data to be inserted in database with 200 status code.
Actual Result: 400 Bad Request</strong></p>
",https://stackoverflow.com/questions/55813118/end-to-end-testing-for-multipart-data,"['typescript', 'loopback']",515,True,0,1
Creating unique and deterministic data-test-ids programmatically,"<p>I'm looking for a way to create unique and deterministic test id's to be used for end-to-end testing. This would mean that running any iteration would produce the exact same id for the exact same component so that tests would have a reliable way to reference an item.</p>

<p>Starting with an example of applying a directive on every button:</p>

<pre><code>@Directive({
    selector: 'button',
})
export class FormControlPropertiesDirective {

    constructor(
        private element: ElementRef,
    ) {
    }
}
</code></pre>

<p>Is there any way I could apply an algorithm or use some distinct property of the element to create something deterministic?</p>
",https://stackoverflow.com/questions/56807626/creating-unique-and-deterministic-data-test-ids-programmatically,"['angular', 'angular-directive']",1442,False,2,1
Cypress.io - sitemap.xml validation test,"<p>:) I chose for automated testing a tool Cypress.io.
I need some tests for my sitemap.xml document and I dont know how to do that :(</p>

<p>I have tried install an npm package libxmljs</p>

<blockquote>
  <p>npm install libxmljs --save</p>
</blockquote>

<p>and load it as plugin in cypress/plugins/index.js</p>

<pre><code>const libxmljs = require('libxmljs');
</code></pre>

<p>But there is a problem with this. It shows an error </p>

<pre><code>The plugins file is missing or invalid.

Your pluginsFile is set to /home/my-app/cypress/plugins/index.js, but
either the file is missing,
it contains a syntax error, or threw an error when required.

The pluginsFile must be a .js or .coffee file.

Please fix this, or set pluginsFile to false if a plugins file is not
necessary for your project.

Error: The module '/home/my-app/node_modules/libxmljs/build/Release/xmljs.node'
</code></pre>

<p>Please help me, how can I use libxmljs in Cypress.io or how i should write tests for Sitemap.xml in this end-to-end testing tool.</p>

<p>Thanks for your time! :)</p>
",https://stackoverflow.com/questions/55100545/cypress-io-sitemap-xml-validation-test,"['cypress', 'sitemap', 'libxml-js']",3054,True,3,4
Run test on browserstack chrome browser in iPhone using testcafe,"<p>I am using TestCafe to perform end to end testing in my project, and using browserstack to support cross-browser testing. </p>

<p>I was able to use browserstack for different browsers in Linux and Windows. But I was not able to test in browsers for mobile devices. </p>

<p>For eg. ""browserstack:opera:Windows XP"" works for opera browser in Windows XP. How to give the same for browsers in mobile devices. I tried checking browser supported with ""testcafe -b browserstack"", but did not get anything for mobile devices.</p>
",https://stackoverflow.com/questions/55395536/run-test-on-browserstack-chrome-browser-in-iphone-using-testcafe,"['automated-tests', 'e2e-testing', 'web-testing', 'browserstack', 'testcafe']",570,True,3,2
cypress XHR API call validation in test cases,"<p>I am exploring if I can use cypress for end-to-end testing or not in angular? I am super beginner in it. </p>

<p>Cypress has some server() instance for XHR. </p>

<p><strong>Question:</strong> 
Suppose I am testing the login page so I can write test cases for querying elements and do the validation. In this process the browser will be making some API call, will it possible to write test cases for validating what was the statusCode the API had retured? What was XHR API response etc?</p>
",https://stackoverflow.com/questions/59397185/cypress-xhr-api-call-validation-in-test-cases,['cypress'],1619,True,0,1
How to run UFT scripts using java,"<p>We have 2 different applications and we need to perform end to end testing. One application support automation through selenium. Other support automation through UFT. I am trying to launch UFT using Java and run the UFT script first. Once UFT part is completed I will work with other applications using selenium. I am successfully able to launch UFT process but unable to execute the script.</p>

<p>As of now, I am successfully able to launch UFT through java code.</p>

<pre><code>public static void main(String args[]) {
    try {
        PrintStream out = new PrintStream(new FileOutputStream(""LaunchQTP.vbs""));
        out.println(""Set qtApp = CreateObject(\""QuickTest.Application\"")"");
        out.println(""qtApp.Launch"");
        out.println(""qtApp.Visible = True"");
        out.close();
        Process p = Runtime.getRuntime().exec(""cscript LaunchQTP.vbs"");
        p.waitFor();
        out.println(p.exitValue());
    } catch (Exception err) {
        err.printStackTrace();
    }
}
</code></pre>

<p>Note: Challenge is how to run the scripts present in UFT after UFT is launched.</p>
",https://stackoverflow.com/questions/58253802/how-to-run-uft-scripts-using-java,"['java', 'qtp', 'hp-uft']",1404,True,1,1
Why do I need to use waitForAngular(false) &amp; browser.sleep(3000)?,"<p>We have a website that is built 100% from Angular and I was asked to use Protractor to write an end to end testing. Now encountered a problem that if I do not use <code>waitForAngular(false)</code> and <code>browser.sleep(3000)</code> then my test fails even I used the <code>ExpectedCondition</code>.</p>

<p>So here is my Scenario:</p>

<p>In the login page, I can find all elements, send keys to the input box and login. But after login, it fails. It cannot find any element, click any element at all. </p>

<p>My Code looks like this.</p>

<pre><code>describe(""/profile"", () =&gt; {
  let page: Profile;

  beforeAll(async () =&gt; {
    page = await login(Profile, user, login);
    await browser.wait(ExpectedConditions.presenceOf(page.element));
    await navigate(path.profile)
  })

  afterAll(async () =&gt; {
    logout();
  })

  it(""should have navigate to the page"", async () =&gt; {
    expect(await browser.getCurrentUrl()).toContain(""/profile"");
  });

  it(""should have correct page markup"", async () =&gt; { 
// this test fails without waitForAngular(false)
// or browser.sleep(3000) in the navigation or OnPrepare in the config
    expect(await page.headerTitle.isDisplayed()).toBe(true);
    expect(await page.headerTitle.getText()).toContain(""Profile"")
  })
})
</code></pre>

<p>What am I doing wrong?</p>
",https://stackoverflow.com/questions/58137082/why-do-i-need-to-use-waitforangularfalse-browser-sleep3000,"['angularjs', 'testing', 'protractor', 'automated-tests', 'end-to-end']",1649,True,0,2
How to check an element is having display block / none style in Protractor?,"<p>I'm having two div's which are having same css, only difference is the style is having display:block and none.</p>

<pre><code>&lt;div class=""autocomplete-suggestions "" style=""left: 91px; top: 333px; min-width: 747px; display: none;""&gt;
   &lt;div&gt;item1&lt;/div&gt;
&lt;div&gt;item2&lt;/div&gt;
&lt;/div&gt;

&lt;div class=""autocomplete-suggestions "" style=""left: 91px; top: 333px; min-width: 747px; display: block;""&gt;
   &lt;div&gt;item3&lt;/div&gt;
&lt;div&gt;item4&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>How we could identify the which element is having the style display block or none in Protractor?</p>

<p>I need to click item3 div which is reside with display:block div.</p>

<p>I have tried the below code.</p>

<pre><code>browser.findElements(by.css('.autocomplete-suggestions')).then((autoSuggestions) =&gt; {
            autoSuggestions.map((item) =&gt; {
                if (item.isDisplayed()) {
                    item.getTagName().then((x) =&gt; {
                        console.log('tagname', x);
                    });
                    browser.pause();
                    //item[index].click();
                }
            })
</code></pre>

<p>from the above code i can see both div's.</p>

<p>I'm receiving 'could not find element 'click on undefined' error.</p>

<p>I'm trying end to end testing with Anuglar 7, protractor, jasmine and selenium web driver.</p>
",https://stackoverflow.com/questions/56035500/how-to-check-an-element-is-having-display-block-none-style-in-protractor,"['selenium-webdriver', 'jasmine', 'protractor', 'e2e-testing', 'angular-e2e']",1201,True,0,2
How to test Vue Single File Components with Cypress End To End snapshot testing,"<p>I have a Vue Single File Component that I'm trying to snapshot test with Cypress end-to-end testing and @cypress/snapshot.</p>

<p>An issue could arise if a component's html gets dynamically generated data or attributes. For example, a single file component with scoped CSS styles adds 'data-v-[some hash]' attribute to elements, and if the hash changes the test would fail too.</p>

<pre><code>&lt;label class=""label"" data-v-0ee42ab8=""""&gt;
</code></pre>

<p>After rebuild</p>

<pre><code>&lt;label class=""label"" data-v-ca809ab3=""""&gt;
</code></pre>

<p>Is there any option to safely ignore parts of snapshot comparison, such as ""data-v-*"", so tests would still pass? Is snapshot testing not the way to go here, and/or are there better options? </p>
",https://stackoverflow.com/questions/59075905/how-to-test-vue-single-file-components-with-cypress-end-to-end-snapshot-testing,"['vue.js', 'e2e-testing', 'cypress']",682,True,0,1
Best practices for e2e tests with remote resources,"<p>I'm refactoring some e2e tests that are failing often. Likely because I can never be sure that the resources written in step 1 and there for steps 2 and 3.</p>

<p>There is sort of a strict chain of logic, but each test is not atomic in any way. Im not looking for specific python style advice (but I'd be happy to take some advice on how best to use pytest for end to end testing)</p>

<p>Is there a best practice for creation, verification and deletion of remote resources in an end to end test?</p>

<p>The four tests do the following:</p>

<pre><code>test_write_credentials_to_cloud #This one always works
test_get_credentials_from_cloud #This is the one that often fails
test_delete_credentials_from_cloud #sometimes this one fails
test_verify_credentials_deleted_in_cloud #this one never is the problem```
</code></pre>
",https://stackoverflow.com/questions/58810730/best-practices-for-e2e-tests-with-remote-resources,"['python', 'cloud', 'integration-testing', 'pytest']",303,False,0,1
What is the gradlew task assembleAndroidTest and what are the Test applications in Android?,"<p>I've been coding in React-Native for a while and when I need to I write some native Android code as well. However, I had not seen this gradle task until I started using a library which used this particular gradle task. </p>

<p>That library is an end-to-end testing library (detox), and it uses this command <code>""cd android &amp;&amp; ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug &amp;&amp; cd ..""</code> to build the android <code>.apk</code> that will be used in the automated e2e test. Actually it builds two apks, the debug one and the AndroidTest one, but I don't know where the latter comes from or where it's configured or where the docs are about this.</p>

<p>I searched for an hour and did not find anything other than this very short description:
<code>assembleAndroidTest - Assembles all the Test applications.</code></p>

<p>What are the Test applications?</p>

<p>Also, what is <code>-DtestBuildType=debug</code>?</p>
",https://stackoverflow.com/questions/56212792/what-is-the-gradlew-task-assembleandroidtest-and-what-are-the-test-applications,"['android', 'react-native', 'detox']",5684,True,11,1
Detox Testing with Expo - Cannot connect to Emulator,"<p>I'm currently building a proof-of-concept to see if we can use Detox for end-to-end testing a React Native app that's built using Expo.</p>

<p>I've followed the instructions <a href=""https://github.com/wix/Detox/blob/master/docs/Introduction.GettingStarted.md"" rel=""nofollow noreferrer"">here</a>, but the tests are timing out. When I run the test in trace mode, I get the following error:</p>

<pre><code>detox[11493] WARN:  [Client.js/PENDING_REQUESTS] App has not responded to the network requests below:
  (id = 2) invoke: {""target"":{""type"":""Invocation"",""value"":{""target"":{""type"":""EarlGrey"",""value"":""instance""},""method"":""det
ox_selectElementWithMatcher:"",""args"":[{""type"":""Invocation"",""value"":{""target"":{""type"":""Class"",""value"":""GREYMatchers""},""method"":""matcherForAccessibilityID:"",""args"":[{""type"":""NSString"",""value"":""vwGatedBackground""}]}}]}},""method"":""assertWithMatcher:"",""args"":[{""type"":""Invocation"",""value"":{""target"":{""type"":""Class"",""value"":""GREYMatchers""},""method"":""matcherForSufficientlyVisible"",""args"":[]}}]}
  (id = -1000) isReady: {}

That might be the reason why the test ""Example should have welcome screen"" has timed out.
</code></pre>

<p>Has anyone had any experience with getting this set-up running? I'm testing just for iOS and using the XCode iOS emulator.</p>

<p>As far as I can read, this is a community-supported integration rather being something offered officially by Detox, so it's possible that this just doesn't work, but I thought I'd check to see if anyone's had any luck with getting this set-up running?</p>
",https://stackoverflow.com/questions/58647637/detox-testing-with-expo-cannot-connect-to-emulator,"['ios', 'react-native', 'expo', 'detox']",138,False,2,0
SudsLibrary in Robot Framework: Getting &amp; Setting object attributes,"<p>I am working with the SudsLibrary for Robot Framework. Below is the Rq/Rs for the webservice I'm testing. You will also find the Robot Framework info and my comment on what's going on.</p>

<p>REQUEST</p>

<pre><code>&lt;soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:sec=""http://localhost/ABC/Services/Security/""&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;sec:AuthUser&gt;
         &lt;sec:userName&gt;MyAdmin&lt;/sec:userName&gt;
         &lt;sec:password&gt;Password123&lt;/sec:password&gt;
      &lt;/sec:AuthUser&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;
</code></pre>

<p>RESPONSE</p>

<pre><code>&lt;soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:wsa=""http://schemas.xmlsoap.org/ws/2004/08/addressing"" xmlns:wsse=""http://docs.ompum-open.org/wss/2004/01/ompum-200401-wss-wssecurity-secext-1.0.xsd"" xmlns:wsu=""http://docs.ompum-open.org/wss/2004/01/ompum-200401-wss-wssecurity-utility-1.0.xsd""&gt;
   &lt;soap:Header&gt;
      ...
   &lt;/soap:Header&gt;
   &lt;soap:Body&gt;
      &lt;AuthUserResponse xmlns=""http://localhost/ABC/Services/Security/""&gt;
         &lt;AuthTicket&gt;k3l5d9k6-3z53-8765-b512-df09as87&lt;/AuthTicket&gt;
      &lt;/AuthUserResponse&gt;
   &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;
</code></pre>

<pre><code>*** Settings ***
Library  SudsLibrary

*** Test Case ***
Check App Auth Ticket
    Create Soap Client    http://localhost/Services/Authentication.asmx?wsdl
    ${WSDLobj}    Create Wsdl Object    AuthUser
    Set Wsdl Object Attribute    ${WSDLobj}    userName    MyAdmin
    Set Wsdl Object Attribute    ${WSDLobj}    password    Password123
    ${result}    Call Soap Method    AuthUser    ${WSDLobj}
    log    Result: ${result}
    # Now get the specific element from the response
    ${AuthVal}    Get Wsdl Object Attribute    ${result}    AuthTicket
    log    Auth Ticket: ${AuthVal}
</code></pre>

<p>Everything is successful in my test case <code>Check App Auth Ticket</code> until I call the SudsLibrary <code>Get Wsdl Object Attribute</code> keyword. The following error occurs: <code>ValueError: Object must be a WSDL object (suds.sudsobject.Object)</code>. Why would I get an error when the object is created and is called successfully?</p>

<p>When I print out the <code>${result}</code> variable, it is the value for <code>AuthVal</code>. However, I am wanting to explicitly extract a specific value / element from the web service response. I have other web service responses that will require me to parse this data for my end to end testing.</p>
",https://stackoverflow.com/questions/54597412/sudslibrary-in-robot-framework-getting-setting-object-attributes,"['soap', 'robotframework', 'suds']",738,False,2,0
Voice Bot Testing using Botium,"<p>I am working on Alexa Voice Bot testing using Botium. As part of it, i have done the below steps as instructed in the Botium tutorial.</p>

<ol>
<li>Node JS installation</li>
<li>Git Installation</li>
<li>AWS account created</li>
<li>Created Profile and got Credentials</li>
<li>installed ASK-CLI</li>
<li>Created New Skill</li>
<li>Deployed the Skill via ASK-CLI</li>
<li>Able to open Simulator.</li>
<li>The Simulator giving Json response of the Skill as a response.</li>
</ol>

<p>Now my question is, How can i create conversation files(Test cases) for the deployed skill and how can i execute them using Botium.
How can i configure my Alexa skill with Botium to do End-to-End testing.</p>

<p>Please help, Thanks in advance.</p>

<p>Regards,
Chidvilas. K</p>
",https://stackoverflow.com/questions/57250257/voice-bot-testing-using-botium,['chatbot'],342,False,0,1
Does &quot;find&quot; in Cypress wait for GraphQL requests to finish?,"<p>I am learning to write tests for a MERNQ stack application and I am using cypress as my End to End testing tool. I am trying to make sure that my tests are written correctly so that they work as a long term solution. For now I just have one request for the route in question and I have the following test code:</p>

<pre><code>describe('Song API', () =&gt; {
    it('should show at least one song', () =&gt; {
        cy.server();
        // cy.route('GET', '/graphql').as('graphql');
        cy.route({
            method: 'GET', // Route all GET requests
            url: 'http://localhost:8080/graphql', // that have a URL that matches '/graphql'
            response: {
                data: {
                    loading: false,
                    songs: [
                        {
                            id: 1,
                            name: 'Boo Ya',
                        },
                    ],
                },
            },
        }).as('getSongs');
        cy.visit('http://localhost:8080').then(() =&gt; {
            cy.get('.collection').find('.collection-item');
        });
    });
});
</code></pre>

<p>I don't understand what about this code makes it wait for the graphql response to finish before running and additionally I am not getting the data that I set but instead the actual data from the database.</p>

<p>This seems very strange to me.</p>

<p>My component looks like this:</p>

<pre><code>import React from 'react';
import gql from 'graphql-tag';
import { graphql } from 'react-apollo';

const SongList = ({ data }) =&gt; {
    // console.log(data);
    function renderSongs() {
        console.log(data);
        if (data.loading) {
            return &lt;p&gt;Loading...&lt;/p&gt;;
        } else {
            return data.songs.map(song =&gt; {
                return (
                    &lt;li key={song.key} className=""collection-item""&gt;
                        {song.title}
                    &lt;/li&gt;
                );
            });
        }
    }

    return &lt;ul className=""collection""&gt;{renderSongs()}&lt;/ul&gt;;
};

const query = gql`
    query getSongs {
        songs {
            key: id
            title
        }
    }
`;

export default graphql(query)(SongList);
</code></pre>

<p>Any thoughts or remarks?</p>
",https://stackoverflow.com/questions/55811530/does-find-in-cypress-wait-for-graphql-requests-to-finish,"['graphql', 'cypress']",1155,True,0,1
Guice: add dependency in a method,"<p>I have a Cucumber project using Selenium for end-to-end testing. My Page classes extend my BasePage and have @ScenarioScoped annotation for sharing state between the steps. I have a NavigationStepDefs class where I open different pages and my goal is to keep the page object so I can call it's methods in later steps by invoking them by name. The problem is that I have around 40 pages and I don't want to inject all of them in the NavigationStepDefs constructor. Is there a way to only inject one page when I need it in a method?</p>

<p>I tried adding an Injector for the page I need</p>

<pre><code>    public void the_user_opens_the_Administration_page() {
        final Injector injector = Guice.createInjector();
        final SchedulesPage page = injector.getInstance(SchedulesPage.class);
        System.out.println(page.getProcess().getTagName());
</code></pre>

<p>But I get an error</p>

<pre><code>
1) No scope is bound to cucumber.runtime.java.guice.ScenarioScoped.```
</code></pre>
",https://stackoverflow.com/questions/56666107/guice-add-dependency-in-a-method,"['java', 'dependency-injection', 'cucumber', 'guice']",312,False,0,1
Prevent Appium from launching application?,"<p>I am testing canvas based web application and i have situation where i need to merge python UI automator based testing technique with Nightwatch's End to End  testing. Since canvas based android application doesn't have locator id for some parts i need to test those using nightwatch feature. Nightwatch uses Appium and sets desired configuration for launch. So situation is i have written few steps with UI Automator Python and next step i call node command from python subprocess which causes same application to relaunch. </p>

<ol>
<li>I want to avoid Appium relaunch somehow. EDIT : I am able to achieve it by setting <strong>autoLaunch</strong> <strong>False</strong> </li>
<li>Mechanism to completely avoid Appium and direct send client API on mobile application launched on phone and get response. </li>
</ol>
",https://stackoverflow.com/questions/57638559/prevent-appium-from-launching-application,"['appium', 'nightwatch.js']",213,False,1,1
How to make Python SHA-256 digest match Java SHA-256 digest?,"<p>I have a Java application that generates tokens using SHA-256 hashes. I am trying to port the implementation to Python 3 as part of an end-to-end testing suite.</p>

<p>I've tried following the same steps in the Python implementation as are taken in the Java implementation, yet I'm getting different hex encoded results. Java is using JDK 11 and I am using Python 3.7. </p>

<p>Here is the Java implementation:</p>

<pre class=""lang-java prettyprint-override""><code>import org.apache.commons.codec.binary.Hex;
import java.nio.charset.Charset;
import java.security.MessageDigest;
...

text = ""{\""1\"":\"""" + num + ""\""}"";
MessageDigest mDigest = MessageDigest.getInstance(""SHA-256"");
mDigest.update(text.getBytes(UTF8_CHARSET));
mDigest.update(data1.getBytes(UTF8_CHARSET));
mDigest.update(data2.getBytes(UTF8_CHARSET));
hash = Hex.encodeHexString(mDigest.digest());
</code></pre>

<p>Here is the Python implementation:</p>

<pre class=""lang-py prettyprint-override""><code>from hashlib import sha256
...

text = ""{\""1\"": \"""" + str(num) + ""\""}""
mDigest = sha256()
mDigest.update(text.encode(""UTF-8""))
mDigest.update(data1.encode(""UTF-8""))
mDigest.update(data2.encode(""UTF-8""))
hash = mDigest.hexdigest()
</code></pre>

<p>num, data1, and data2 are presumably the same for both implementations. The sample outputs that I've received from the Java application differ from my Python output despite having the same inputs. From peering over other StackOverflow posts I'm wondering if it could have to do with padding in the update or digest functions.</p>
",https://stackoverflow.com/questions/57482851/how-to-make-python-sha-256-digest-match-java-sha-256-digest,"['java', 'python', 'hash', 'hashlib']",1122,False,2,0
Relationship between Unit Testing &amp; End-to-End (Integration per se) while following BDD,"<p>My question is also related to who does what in typical BDD. My understanding, Product owner comes up with User Story (may or may not in Gherkin), QA writes Scenarios for End-to-End testing(in feature files), Dev writes his code (how and where, does he follow BDD as well?). At this point if the Dev writes the automated Unit Testing, whether this can be leveraged by the QA for End-to-End or they can be absolutely different? </p>

<p>My question is how the Dev and QA leverage each other's work in terms of coding while following BDD. I am not sure how to connect the dots.</p>

<p>Lets take the example of a JAVA based application and QA is already using Cucumber with Selenium Webdriver for automated testing. </p>
",https://stackoverflow.com/questions/54913972/relationship-between-unit-testing-end-to-end-integration-per-se-while-follow,"['java', 'unit-testing', 'cucumber', 'bdd', 'gherkin']",498,True,1,3
Error setting up Detox on React-Native/Expo mobile app: &quot;ReferenceError: element is not defined&quot;,"<p>I am trying to set up end-to-end testing with Detox on a React-Native/Expo mobile app. The app and Jest are currently working fine, but Detox tests give ReferenceError's. I have followed the instructions in this link, <a href=""https://blog.expo.io/testing-expo-apps-with-detox-and-react-native-testing-library-7fbdbb82ac87"" rel=""nofollow noreferrer"">https://blog.expo.io/testing-expo-apps-with-detox-and-react-native-testing-library-7fbdbb82ac87</a>, as well as the Detox and Jest websites.
I have run the tests through a jest script (<code>yarn test</code>) and <code>detox test</code>.</p>

<pre><code>$ detox test --loglevel trace
detox[51199] INFO:  [test.js] configuration=""ios.sim"" loglevel=""trace"" artifactsLocation=""artifacts/ios.sim.2019-04-26 12-31-53Z"" recordLogs=""none"" takeScreenshots=""manual"" recordVideos=""none"" recordPerformance=""none"" node_modules/.bin/jest --config=e2e/config.json --maxWorkers=1 '--testNamePattern=^((?!:android:).)*$' ""e2e""
● Validation Warning:

  Unknown option ""setupFilesAfterEnv"" with value [""./init.js""] was found.
  This is probably a typing mistake. Fixing it will remove this message.

  Configuration Documentation:
  https://jestjs.io/docs/configuration.html

 FAIL  e2e/features/login/index.spec.js
  App
    ✕ should have login screen (272ms)
    ✕ should show hello screen after tap (104ms)
    ✕ should show world screen after tap (105ms)

  ● App › should have login screen

    ReferenceError: device is not defined

      at reloadApp (../node_modules/detox-expo-helpers/index.js:68:3)

  ● App › should have login screen

    ReferenceError: element is not defined
...
</code></pre>

<p>setupFilesAfterEnv <em>is</em> a jest option.</p>

<p>The downloaded Expo IPA is in the directory bin/Exponent.app.</p>

<p>package.json</p>

<pre><code>{
...
  ""main"": ""node_modules/expo/AppEntry.js"",
  ""scripts"": {
    ""start"": ""expo start"",
    ""android"": ""expo start --android"",
    ""ios"": ""expo start --ios"",
    ""test"": ""jest --watchAll --notify"",
    ""lint"": ""eslint ."",
    ""ci"": ""yarn lint &amp;&amp; jest""
  },
  ""dependencies"": {
    ""expo"": ""^32.0.0"",
    ""formik"": ""^1.5.1"",
    ""invariant"": ""^2.2.4"",
    ""prop-types"": ""^15.7.2"",
    ""react"": ""16.5.0"",
    ""react-native"": ""https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"",
    ""react-navigation"": ""^3.3.2"",
    ""react-redux"": ""^6.0.1"",
    ""redux"": ""^4.0.1"",
    ""redux-persist"": ""^5.10.0"",
    ""redux-thunk"": ""^2.3.0"",
    ""reselect"": ""^4.0.0""
  },
  ""devDependencies"": {
    ""@babel/core"": ""^7.3.4"",
    ""babel-eslint"": ""^10.0.1"",
    ""babel-plugin-module-resolver"": ""^3.2.0"",
    ""babel-preset-expo"": ""^5.0.0"",
    ""detox"": ""^12.4.1"",
    ""detox-expo-helpers"": ""^0.6.0"",
    ""eslint"": ""^5.15.0"",
    ""eslint-config-prettier"": ""^4.1.0"",
    ""eslint-plugin-prettier"": ""^3.0.1"",
    ""eslint-plugin-react"": ""^7.12.4"",
    ""expo-detox-hook"": ""^1.0.10"",
    ""jest-expo"": ""^32.0.0"",
    ""prettier"": ""^1.16.4"",
    ""react-native-testing-library"": ""^1.7.0"",
    ""react-test-renderer"": ""^16.8.6"",
    ""redux-devtools-extension"": ""^2.13.8"",
    ""redux-mock-store"": ""^1.5.3""
  },
  ""jest"": {
    ""preset"": ""jest-expo"",
    ""clearMocks"": true
  },
  ""detox"": {
    ""test-runner"": ""jest"",
    ""runner-config"": ""e2e/config.json"",
    ""configurations"": {
      ""ios.sim"": {
        ""binaryPath"": ""bin/Exponent.app"",
        ""type"": ""ios.simulator"",
        ""name"": ""iPhone XR""
      }
    }
  }
}
</code></pre>

<p>The e2e directory is straight from Detox with a few changes for Expo.</p>

<p>e2e/config.json</p>

<pre><code>{
    ""setupFilesAfterEnv"": [""./init.js""],
    ""testEnvironment"": ""node""
}
</code></pre>

<p>e2e/init.js</p>

<pre><code>const detox = require('detox');
const config = require('../package.json').detox;
const adapter = require('detox/runners/jest/adapter');

jest.setTimeout(120000);
jasmine.getEnv().addReporter(adapter);

beforeAll(async () =&gt; {
    await detox.init(config);
});

beforeEach(async () =&gt; {
    await adapter.beforeEach();
});

afterAll(async () =&gt; {
    await adapter.afterAll();
    await detox.cleanup();
});
</code></pre>

<p>login.spec.js</p>

<pre><code>import { reloadApp } from 'detox-expo-helpers';

describe('App', () =&gt; {
    beforeEach(async () =&gt; {
        await reloadApp();
    });

    it('should have login screen', async () =&gt; {
        await expect(element(by.id('login'))).toBeVisible();
    });

    it('should show hello screen after tap', async () =&gt; {
        await element(by.id('hello_button')).tap();
        await expect(element(by.text('Hello!!!'))).toBeVisible();
    });

    it('should show world screen after tap', async () =&gt; {
        await element(by.id('world_button')).tap();
        await expect(element(by.text('World!!!'))).toBeVisible();
    });
});
</code></pre>

<p>On a side note, I don't know why there is the jasmine reference in init.js. I guess it is because JestJS is based on Jasmine. Anyway, it does not seem to be connected with the errors.</p>
",https://stackoverflow.com/questions/55868537/error-setting-up-detox-on-react-native-expo-mobile-app-referenceerror-element,"['react-native', 'jestjs', 'expo', 'detox']",3600,True,2,1
Nativescript-Dev-Appium Setup,"<p>I am trying to implement nativescript-dev-appium in an existing nativescript-angular project and am having a lot of trouble getting the plugin configured.</p>

<p>The simulator appears to be found but the run fails in the <code>before all</code> and <code>after all</code> hooks because it appears to not have a device instance.</p>

<pre><code>walrus:demo-appium niirds$ npm run e2e -- --runType sim.iPhoneX --verbose

&gt; @ e2e /Users/niirds/mobi/demo-appium
&gt; node ./node_modules/nativescript-dev-appium/check-dev-deps.js &amp;&amp;  tsc -p e2e  &amp;&amp;  mocha --opts ./e2e/config/mocha.opts  ""--runType"" ""sim.iPhoneX"" ""--verbose""



/Users/niirds/mobi/demo-appium/e2e/config/appium.capabilities.json
Capabilities found at: /Users/niirds/mobi/demo-appium/e2e/config/appium.capabilities.json 
Appium will use default automation name
Available applications:  [""platforms/ios/build/emulator/demoappium.app""]
Pick first application:   ""platforms/ios/build/emulator/demoappium.app""
Application full path: /Users/niirds/mobi/demo-appium/platforms/ios/build/emulator/demoappium.app 
Found devices:  [ { token: 'C8B1990E-1593-49A8-AA68-C7E5CC2134BB',
    name: 'iPhone X',
    status: 'booted',
    type: 'watch',
    apiLevel: '12.2',
    platform: 'ios',
    config: { density: 3, offsetPixels: 87 } } ]
  1) ""before all"" hook: start server
  2) ""after all"" hook: stop server

  0 passing (2s)
  2 failing

  1) ""before all"" hook: start server:
     TypeError: Cannot read property 'type' of undefined
      at DeviceManager.&lt;anonymous&gt; (node_modules/nativescript-dev-appium/lib/device-manager.js:82:28)
      at Generator.next (&lt;anonymous&gt;)
      at fulfilled (node_modules/nativescript-dev-appium/lib/device-manager.js:4:58)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  2) ""after all"" hook: stop server:
     TypeError: Cannot read property 'platform' of undefined
      at Function.&lt;anonymous&gt; (node_modules/mobile-devices-controller/lib/device-controller.js:104:24)
      at Generator.next (&lt;anonymous&gt;)
      at /Users/niirds/mobi/demo-appium/node_modules/mobile-devices-controller/lib/device-controller.js:7:71
      at new Promise (&lt;anonymous&gt;)
      at __awaiter (node_modules/mobile-devices-controller/lib/device-controller.js:3:12)
      at Function.uninstallApp (node_modules/mobile-devices-controller/lib/device-controller.js:103:16)
      at Object.&lt;anonymous&gt; (node_modules/nativescript-dev-appium/index.js:85:64)
      at Generator.next (&lt;anonymous&gt;)
      at /Users/niirds/mobi/demo-appium/node_modules/nativescript-dev-appium/index.js:7:71
      at new Promise (&lt;anonymous&gt;)
      at __awaiter (node_modules/nativescript-dev-appium/index.js:3:12)
      at Object.stopServer (node_modules/nativescript-dev-appium/index.js:77:12)
      at Object.&lt;anonymous&gt; (e2e/setup.js:16:37)
      at Generator.next (&lt;anonymous&gt;)
      at /Users/niirds/mobi/demo-appium/e2e/setup.js:7:71
      at new Promise (&lt;anonymous&gt;)
      at __awaiter (e2e/setup.js:3:12)
      at Context.after (e2e/setup.js:15:28)
      at process.topLevelDomainCallback (domain.js:121:23)



npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ e2e: `node ./node_modules/nativescript-dev-appium/check-dev-deps.js &amp;&amp;  tsc -p e2e  &amp;&amp;  mocha --opts ./e2e/config/mocha.opts  ""--runType"" ""sim.iPhoneX"" ""--verbose""`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @ e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

</code></pre>

<p>Here is the simulator capability, provided by the installation:</p>

<pre><code>    ""sim.iPhoneX"": {
        ""platformName"": ""iOS"",
        ""platformVersion"": ""/12*/"",
        ""deviceName"": ""iPhone X"",
        ""noReset"": false,
        ""fullReset"": false,
        ""app"": """"
    },
</code></pre>

<p>I have xcode 10.2 installed, and here is the package.json if that helps.</p>

<pre><code>{
  ""nativescript"": {
    ""id"": ""org.nativescript.demoappium"",
    ""tns-android"": {
      ""version"": ""5.3.0""
    },
    ""tns-ios"": {
      ""version"": ""5.3.0""
    }
  },
  ""description"": ""NativeScript Application"",
  ""license"": ""SEE LICENSE IN &lt;your-license-filename&gt;"",
  ""repository"": ""&lt;fill-your-repository-here&gt;"",
  ""scripts"": {
    ""lint"": ""tslint \""src/**/*.ts\"""",
    ""e2e"": ""node ./node_modules/nativescript-dev-appium/check-dev-deps.js &amp;&amp;  tsc -p e2e  &amp;&amp;  mocha --opts ./e2e/config/mocha.opts "",
    ""e2e-watch"": ""tsc -p e2e --watch""
  },
  ""dependencies"": {
    ""@angular/animations"": ""~7.2.0"",
    ""@angular/common"": ""~7.2.0"",
    ""@angular/compiler"": ""~7.2.0"",
    ""@angular/core"": ""~7.2.0"",
    ""@angular/forms"": ""~7.2.0"",
    ""@angular/http"": ""~7.2.0"",
    ""@angular/platform-browser"": ""~7.2.0"",
    ""@angular/platform-browser-dynamic"": ""~7.2.0"",
    ""@angular/router"": ""~7.2.0"",
    ""nativescript-angular"": ""~7.2.0"",
    ""nativescript-theme-core"": ""~1.0.4"",
    ""reflect-metadata"": ""~0.1.12"",
    ""rxjs"": ""~6.3.0"",
    ""tns-core-modules"": ""~5.3.0"",
    ""zone.js"": ""~0.8.26""
  },
  ""devDependencies"": {
    ""@angular/compiler-cli"": ""~7.2.0"",
    ""@nativescript/schematics"": ""~0.5.0"",
    ""@ngtools/webpack"": ""~7.2.0"",
    ""@types/chai"": ""~4.1.7"",
    ""@types/mocha"": ""~5.2.5"",
    ""@types/node"": ""~10.12.18"",
    ""codelyzer"": ""~4.5.0"",
    ""mocha"": ""~5.2.0"",
    ""mocha-junit-reporter"": ""~1.18.0"",
    ""mocha-multi"": ""~1.0.1"",
    ""nativescript-dev-appium"": ""^5.1.0"",
    ""nativescript-dev-sass"": ""~1.7.0"",
    ""nativescript-dev-typescript"": ""~0.9.0"",
    ""nativescript-dev-webpack"": ""~0.21.0"",
    ""tslint"": ""~5.11.0""
  },
  ""gitHead"": ""6ccaee804c71761be1c2f91d0b2dd67c8ba6d2b6"",
  ""readme"": ""NativeScript Application""
}
</code></pre>

<p>Steps to reproduce:
1. create sample nativescript-angular app--i used the tab navigation one for this test.
2. install nativescript-dev-appium: <code>npm i -D nativescript-dev-appium</code>
3. install other dependencies <a href=""https://docs.nativescript.org/angular/tooling/testing/end-to-end-testing/overview#environment-setup"" rel=""nofollow noreferrer"">https://docs.nativescript.org/angular/tooling/testing/end-to-end-testing/overview#environment-setup</a>
4. build app: <code>tns build &lt;platform&gt;</code>
5. run test: `npm run e2e -- --runType </p>

<p>i have been trying to get this to work on iOS for now.
Any help will be greatly appreciated!</p>
",https://stackoverflow.com/questions/55422478/nativescript-dev-appium-setup,"['appium', 'nativescript', 'nativescript-angular']",487,True,1,1
"Cypress.io - function visit takes a long time, it is waiting until all resources are loaded","<p>I am using a Cypress.io for end to end testing in our team, but we have a problem with function  cy.visit() very often.</p>

<p>The website has many resources from our server (css files, js files,....) and some external resources (js files).
If you open our website, sometimes it happens that external js file is pending (browser is waiting).</p>

<p>Cypress during the execution of  cy.visit() is probably waiting until all resources are loaded. And this is a problem. I dont need to wait for all resources, because for example this external js is for an advert and it is not important for our test.</p>

<p>Can i tell to Cypress something like: ""After a few seconds after start loading a page you can exec this test without all resources loaded""?</p>

<p>I have tried onBeforeLoad combine with setTimeout and reload, but it failed :(</p>

<pre><code>cy.visit('https://www.example.org', {
 onBeforeLoad: (win) =&gt; {
   setTimeout(function() {cy.reload(); }, 10000);
 }
})
</code></pre>

<p>I am so crazy a I dont know what do next. Please help me and sorry for my english :) Thank you! :)</p>
",https://stackoverflow.com/questions/55376564/cypress-io-function-visit-takes-a-long-time-it-is-waiting-until-all-resources,"['google-chrome', 'e2e-testing', 'cypress']",2897,True,8,1
Error running TestCafe Docker Image on GitLab CI job . Trying to execute automated end-to-end tests on BrowserStack,"<p>We're trying to run <strong>testcafe</strong> end-to-end tests on <strong>BrowserStack</strong> triggered by a gitlab CI job.  However, we see an error:</p>

<pre><code>Error: spawn /home/user/.browserstack/BrowserStackLocal ENOENT
</code></pre>

<p>We are following <strong>Option 1 - Use TestCafe Docker Image</strong> <a href=""https://devexpress.github.io/testcafe/documentation/continuous-integration/gitlab.html"" rel=""nofollow noreferrer"">https://devexpress.github.io/testcafe/documentation/continuous-integration/gitlab.html</a> which adds an end-to-end testing job to our <code>.gitlab-ci.yml</code> file. We created a <code>.base_e2e</code> job base that is used in the <code>e2e_dev</code> job (see below)</p>

<p>We're also using the <code>testcafe-browser-provider-browserstack</code> <strong>npm dependency</strong> which allows our testcafe end-toend tests to be executed on BrowserStack, as mentioned here <a href=""https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/browsers/browser-support.html#browsers-in-cloud-testing-services"" rel=""nofollow noreferrer"">https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/browsers/browser-support.html#browsers-in-cloud-testing-services</a></p>

<p>This is a copy of the gitlab CI job error:</p>

<pre><code>Running with gitlab-runner 11.7.0 (8bb608ff)
  on ec2-docker-runner 1c5ac6dc
Using Docker executor with image testcafe/testcafe ...
Pulling docker image testcafe/testcafe ...
Using docker image sha256:f4d0d6abb93c9 for testcafe/testcafe ...
Running on runner-1c5ac6dc-project-7261073-concurrent-0 via ip-10-250-5-194...
Fetching changes...
Removing build/
Removing coverage/
Removing node_modules/
Removing stats.json
HEAD is now at 8574401 Add space before script property
Checking out 8574401c as feature/e2e-on-pipeline...
Skipping Git submodules setup
Downloading artifacts for install_dependencies (150115951)...
Downloading artifacts from coordinator... ok        id=150115951 responseStatus=200 OK token=yMPpwZa1
Downloading artifacts for test (150115953)...
Downloading artifacts from coordinator... ok        id=150115953 responseStatus=200 OK token=pjsisESV
Downloading artifacts for build_dev (150115954)...
Downloading artifacts from coordinator... ok        id=150115954 responseStatus=200 OK token=6hsG8sxx
$ /opt/testcafe/docker/testcafe-docker.sh ""browserstack:Chrome@53.0:Windows 10"" tests/e2e
Using locally installed version of TestCafe.
Error while trying to execute binary { Error: spawn /home/user/.browserstack/BrowserStackLocal ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn /home/user/.browserstack/BrowserStackLocal',
  path: '/home/user/.browserstack/BrowserStackLocal',
  spawnargs:
   [ '--daemon',
     'start',
     '--log-file',
     '/dev/null',
     '--key',
     'nyyp6nnWiL2S6Y7HkvrH',
     '--local-identifier',
     1548265103368,
     '--enable-logging-for-api' ],
  cmd:
   '/home/user/.browserstack/BrowserStackLocal --daemon start --log-file /dev/null --key nyyp6nnWiL2S6Y7HkvrH --local-identifier 1548265103368 --enable-logging-for-api' }
</code></pre>

<p>Full<code>.gitlab-ci.yml</code> file </p>

<pre><code>image: node:8-alpine

stages:
- e2e

#############
# Job Bases #
#############
.base_e2e:
  stage: e2e
  image:
    name: testcafe/testcafe
    entrypoint: [""/bin/sh"", ""-c""]
  script:
    - /opt/testcafe/docker/testcafe-docker.sh ""browserstack:Chrome@53.0:Windows 10"" tests/e2e

#############
# Jobs      #
#############
e2e_dev:
  extends: .base_e2e
  variables:
    ENVIRONMENT: dev
    TEST_E2E_APP_URL: https://$ENVIRONMENT.example.com
  only:
    - /^feature/.*$/
    - /^fix/.*$/
    - /^bug/.*$/
  when: manual
</code></pre>

<p><strong>Additional information</strong></p>

<p>When we run the following command yarn i.e <code>yarn test:e2e_pipeline</code> the end-to-end test is executed and a video recording of the automation uploaded to BrowserStack without a problem.</p>

<pre><code>""scripts"": {
    ""test:e2e_all"": ""testcafe 'chrome,firefox' tests/e2e"",
    ""test:e2e_pipeline"": ""testcafe 'browserstack:Chrome@53.0:Windows 10' tests/e2e""
  },
</code></pre>

<p>We have the following <strong>devDependencies</strong> inside our <code>package.json</code></p>

<pre><code>""devDependencies"": {
    ""testcafe"": ""^0.23.3"",
    ""testcafe-browser-provider-browserstack"": ""^1.7.0"",
}
</code></pre>
",https://stackoverflow.com/questions/54348443/error-running-testcafe-docker-image-on-gitlab-ci-job-trying-to-execute-automat,"['javascript', 'testing', 'npm', 'browserstack', 'testcafe']",827,True,1,1
How to extend ViewProps in Flow?,"<p>Flow type complains about non-existent prop in ViewProps after upgrade. I am looking to extend ViewProps to allow the additional props for the sake of end-to-end testing.</p>

<p>I have a legacy codebase recently upgraded to the latest flow type version together with the react-native upgrade. Flow started complaining about some non-existent props used in <code>View</code>:</p>

<p><code>Cannot create View element because property tabLabel is missing in ViewProps [1] but exists in props [2]</code></p>

<p>The code looks like this:</p>

<pre><code>&lt;View tabLabel={{name: 'SOME_TAB_NAME', testID: 'TEST'}}&gt; .. &lt;/View&gt;
</code></pre>

<p>If I remove <code>tabLabel</code> I'll have to refactor the end-to-end test I have and the code base is huge. I'd rather not, but instead I'd like to do something like this:</p>

<pre><code>declare module 'react-native' {
  declare type ViewProps = ViewProps &amp; { tabLabel: {name: string; testID: string }}
}
</code></pre>

<p>At the moment, I added a suppress_type annotation to mute the error, but this is not great because I can't make sure that the rest of props in View are inputed correctly. All I want is to allow flow to pass for this specific prop, either by extending or by suppressing this narrow specific error.</p>
",https://stackoverflow.com/questions/57512031/how-to-extend-viewprops-in-flow,"['reactjs', 'react-native', 'flowtype']",807,False,1,1
Azure csi disk FailedAttachVolume issue : could not get disk name from disk URL,"<p>I am using azure csi disk driver method for implementing K8 persistent volume. I have installed azure-csi-drivers in my K8 cluster and using below mentioned files as end-to-end testing purpose but my deployment is getting failed due to following error :</p>

<blockquote>
  <p>Warning FailedAttachVolume 23s (x7 over 55s) attachdetach-controller
  AttachVolume.Attach failed for volume ""pv-azuredisk-csi"" : rpc error:
  code = NotFound desc = Volume not found, failed with error: could not
  get disk name from
  /subscriptions/464f9a13-7g6o-730g-hqi4-6ld2802re6z1/resourcegroups/560d_RTT_HOT_ENV_RG/providers/Microsoft.Compute/disks/560d-RTT-PVDisk,
  correct format:
  ./subscriptions/(?:.)/resourceGroups/(?:.*)/providers/Microsoft.Compute/disks/(.+)</p>
</blockquote>

<p>Note: I have checked multiple times, my URL is correct but I am not sure if underscore in resource group name is creating any problem, RG = ""560d_RTT_HOT_ENV_RG"". Please suggest if anyone have any idea what is going wrong?</p>

<p>K8 version : 14.9<br>
CSI drivers : v0.3.0</p>

<h2>My YAML files are :</h2>

<pre><code>csi-pv.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-azuredisk-csi
namespace: azure-static-diskpv-csi-fss
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
csi:
driver: disk.csi.azure.com
readOnly: false
volumeHandle: /subscriptions/464f9a13-7g6o-730g-hqi4-6ld2802re6z1/resourcegroups/560d_RTT_HOT_ENV_RG/providers/Microsoft.Compute/disks/560d-RTT-PVDisk
volumeAttributes:
cachingMode: ReadOnly
fsType: ext4
-------------------------------------------------------------------------------------------------
</code></pre>

<pre><code>csi-pvc.yaml

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-azuredisk-csi
namespace: azure-static-diskpv-csi-fss
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
volumeName: pv-azuredisk-csi
storageClassName: """"
</code></pre>

<hr>

<pre><code>nginx-csi-pod.yaml

kind: Pod
apiVersion: v1
metadata:
name: nginx-azuredisk-csi
namespace: azure-static-diskpv-csi-fss
spec:
nodeSelector:
beta.kubernetes.io/os: linux
containers:
image: nginx
name: nginx-azuredisk-csi
command:
""/bin/sh""
""-c""
while true; do echo $(date) &gt;&gt; /mnt/azuredisk/outfile; sleep 1; done
volumeMounts:
name: azuredisk01
mountPath: ""/mnt/azuredisk""
volumes:
name: azuredisk01
persistentVolumeClaim:
claimName: pvc-azuredisk-csi
</code></pre>
",https://stackoverflow.com/questions/59206349/azure-csi-disk-failedattachvolume-issue-could-not-get-disk-name-from-disk-url,"['azure', 'kubernetes', 'persistent-volumes']",2218,False,0,1
What is the use case for a Cypress Dashboard User?,"<p>Cypress does End to End testing.  And I hear good things about it.</p>

<p>As I look at the pricing model, I see that you can get 20 users of the dashboard for $4,788 per year.  My company has 100 developers that will at times be needing to write End To End tests for their projects.  That comes to $47,880 per year.  </p>

<p>$50K is too much for me to ask my boss for when there are so many open source options out there (ie Jest + Puppet).</p>

<p>But I noticed that they indicate that the Cypress Test Runner is free and Open Source.  So I am confused now.</p>

<p>Can one get by with just the test runner?  Or is that more like saying it is free for your build server?  Does everyone who authors End to End tests end up using the Cypress Dashboard?</p>

<p><strong>What is the difference between using the Cypress Test Runner and the Cypress Dashboard?</strong>  </p>
",https://stackoverflow.com/questions/59329549/what-is-the-use-case-for-a-cypress-dashboard-user,['cypress'],579,False,3,0
JS library to check if extra data field returned in http response payload?,"<p>I’m currently working on building end-to-end testing for an API another team is working on, and I was wondering if anyone perhaps knows about a JS library that I could use to test whether an extra field is returned in HTTP response body? The purpose of this functionality would be to keep the QA team informed when the dev team makes changes to the api via the tests, instead of the developers manually having to let us know they’ve created updates. I know this can be implemented manually but if the wheel already exists, I’d prefer to avoid recreating it lol.</p>

<p>Example scenario:</p>

<p>API call: GET user
    - returns : user name, user ID and user birthday.</p>

<p>With proposed functionality, if the dev team made updates to the Get user call, and it returns the following
   - return  : user name, user ID, user birthday AND user address.</p>

<p>A test would fail to let me know that an extra field that wasn't expected (user address) was returned.</p>
",https://stackoverflow.com/questions/54098200/js-library-to-check-if-extra-data-field-returned-in-http-response-payload,"['javascript', 'http', 'testing']",161,True,1,2
Testing express application with mongodb,"<p>I have a question regarding the different tests for a node and specifically an express application. 
I am new to node/express coming from a PHP background, so have a few questions.</p>

<p>I know about unit testing, using things like PHPUnit, so I have read about about Jest. My specific questions regarding jest and unit testing in an application like express. Is should I be breaking my code apart more? It currently is quite together my routes are basically where all my business logic is found. Which means it's difficult to unit test?</p>

<p>Then with something else like end to end testing, I am looking at testcafe. For this I am really unsure how to get past my authentication and furthermore how to test on my local machine, before pushing code to production.</p>

<p>Full disclosure, I have a CI setup to my main branch, so I am looking to implement these tests to stop me merging breaking code to my master branch and breaking the production site.</p>
",https://stackoverflow.com/questions/59220683/testing-express-application-with-mongodb,"['node.js', 'unit-testing', 'express', 'jestjs', 'end-to-end']",212,True,0,2
How to stub out and test ssh commands,"<p>I am a developer on a system that sends out ssh commands, roughly in the format 'ssh -o 'BatchMode yes' hostname command'. I am working on our end to end testing and am tasked with mocking out the remote servers during testing. I need to prevent the ssh command running on the remote server, and instead capture the ssh command in some way, check it matches what I expect for that test and return a response specified specifically for that test to control the test flow. My system is in python and runs in RHEL7 docker containers, a solution that can be created within those technologies would be preferable. Does anyone have any suggestions of the best way to do this?</p>

<p>I have considered alias'ing ssh but i don't think that's ideal as i'm restricting the scope of the test more than if the ssh command is carried out. My best idea is creating a mock ssh server that captures the command but i have yet to find the technology to easily capture a non-interactive ssh command and respond.</p>
",https://stackoverflow.com/questions/58243340/how-to-stub-out-and-test-ssh-commands,"['python', 'testing', 'ssh', 'end-to-end']",344,False,1,0
TumblingProcessingTimeWindows processing with event time characteristic is not triggered,"<p>My use-case is quite simple I receive events that contain ""event timestamp"", and want them to be aggregated based on event time. and the output is a periodical processing time tumbling window every 10min. </p>

<p>More specific, the stream of data that is keyed and need to compute counts for 7 seconds.</p>

<ol>
<li>a tumbling window of 1 second</li>
<li>a sliding window for counting 7 seconds with an advance of 1 second </li>
<li>a windowall to output all counts every 1s</li>
</ol>

<p>I am not able to integration test it (i.e., similar to unit test but an end-to-end testing) as the input has fake event time, which won't trigger </p>

<p>Here is my snippet</p>

<pre><code>env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime)

val oneDayCounts = data
  .map(t =&gt; (t.key1, t.key2, 1L, t.timestampMs))
  .keyBy(0, 1)
  .timeWindow(Time.seconds(1))
  .sum(2)

val sevenDayCounts = oneDayCounts
  .keyBy(0,1)
  .timeWindow(Time.seconds(3), Time.seconds(1))
  .sum(2)

// single reducer
sevenDayCounts
  .windowAll(TumblingProcessingTimeWindows.of(Time.seconds(1)))
  .process(...)
</code></pre>

<p>I use EventTime as timestamp and set up an integration test code with <code>MiniClusterWithClientResource</code>. also created some fake data with some event timestamp like 1234l, 4567l, etc.</p>

<p>EventTimeTrigger is able to be fired for sum computation but the following TumblingProcessingTimeWindow is not able to trigger. I had a Thread.sleep of 30s in the IT test code but still not triggered after the 30s</p>
",https://stackoverflow.com/questions/58387093/tumblingprocessingtimewindows-processing-with-event-time-characteristic-is-not-t,"['apache-flink', 'flink-streaming']",1475,True,0,1
Protractor dealing with promises and arrays in flow control,"<p>I'm working on some Jasmine end-to-end testing, using Protractor test runner. The application I am testing is a simple webpage. I already have a test scenario that works fine. </p>

<p>Now I'd like to improve my code so that I can use the same script to run the testing scenario twice.</p>

<ul>
<li>The first time: the test would be performed on the English version of the page</li>
<li>The second time: on a translated version of the same page.</li>
</ul>

<p>Here is my code:</p>

<pre><code>var RandomSentenceInThePage = [""Sentence in English"", ""Phrase en Francais""];
var i;
var signInButton;
var TranslationButton;
var RandomSentenceInThePageBis;
i = 0;
//Runs the testing scenario twice
while (i &lt; 2) {
  describe('TC1 - The registration Page', function() {
    //the translation is done on the second iteration
    if (i != 0) {
      beforeEach(function() {
        browser.ignoreSynchronization = true;
        browser.get('https://Mywebsite.url.us/');
        //we get the translation button then click on it
        TranslationButton = element(by.css('.TranslationButtonClass'));
        TranslationButton.click();
      });
    }
    //On the first iteration, we run the test on the not translated page…
    Else {
      beforeEach(function() {
        browser.ignoreSynchronization = true; //Necessary for the browser.get() method to work inside the it statements.
        browser.get('https://Mywebsite.url.us/');
      });
    }

    it('should display the log in page', function() {
      //Accessing the browser is done in the before each section
      signInButton = element(by.css('.SignInButtonClass'));
      signInButton.click();

      RandomSentenceInThePageBis = element(by.css('.mt-4.text-center.signin-header')).getText();
      /*******************[HERE IS WHERE THE PROBLEM IS]*******************/
      expect(RandomSentenceInThePageBis.getText()).toEqual(RandomSentenceInThePage[i]);
    });
    /*******************************************************************/
  });
}
</code></pre>

<p>I have highlighted the problematic section. The code keeps running even before the comparison between RandomSentenceInThePage[i] and RandomSentenceInThePageBis are compared. And when they are finally compared, the loop is already done.</p>

<p>According to what I have seen on the other related topics, because of the use of expect statements and getText() methods, I am dealing with promises and I have to wait for them to be resolved. After trying for the whole day, I think I could use a hint on how to deal with this promise resolution. Let me know if you need more information.</p>
",https://stackoverflow.com/questions/55253570/protractor-dealing-with-promises-and-arrays-in-flow-control,"['jasmine', 'protractor']",69,True,-1,1
Is there a conventional way to document Jest/Puppeteer test suites?,"<p><strong>Summary of problem:</strong> I'm writing several test suites using Jest and Puppeteer to automate end-to-end testing of my Angular JS app. I'm big on documentation, as it is important to help future developers get up to speed more quickly. Unfortunately, <strong>I don't know of a conventional/widely accepted method for documenting test suites written with Jest</strong>. I've already written an extensive README that explains the tools we're using, how my team configured Jest/Puppeteer, and how to get started writing tests. What I'm specifically wondering about is how to document WITHIN each test suite, or if it is even necessary to spend time doing that (I'm leaning towards <em>yes, it is <strong>definitely</strong> worth spending time doing that</em> on the latter question). </p>

<p><strong>Here's some sample code that I'd like to document:</strong></p>

<pre><code>// index.spec.js
// Insert comment here describing test file (aka test suite)
const puppeteer = require('puppeteer');

(async () =&gt; {
    const browser = await puppeteer.launch({headless: false});
    const page = await browser.newPage();

    // Insert comment here describing test suite
    describe('load startpage', async () =&gt; {
        // Insert comment here describing test
        test('page loads', async () =&gt; {
          await page.goto('https://my-site.com', {waitUntil: 'networkidle0'});
        });
    });
    // Insert comment here describing test suite
    describe('complete form', async () =&gt; {
        // Insert comment here describing test
        test('populate form', async () =&gt; {
            let formSelector = 'form[name=""form1""]';
            await page.waitForSelector(formSelector, {timeout: 3000}); 
            await page.waitForSelector(formSelector+' input', {timeout: 3000});
            await page.click(formSelector+' input');
            await page.keyboard.type('Hello World');
            let submitButtonSelector = 'form[name=""form1""] button[type=""submit""]';
            await page.click(submitButtonSelector);
        });
        // Insert comment here describing test
        test('submit form', async() =&gt; {
            let submitButtonSelector = 'form[name=""form1""] button[type=""submit""]';
            await page.waitForSelector(submitButtonSelector, {timeout: 3000}); 
            await page.click(submitButtonSelector);
        });
    });
    await browser.close();
})();
</code></pre>

<p><strong>What I've already tried:</strong>
I've researched a little about the conventional method for documenting Javascript via <a href=""https://devdocs.io/jsdoc/"" rel=""nofollow noreferrer"">JSDoc</a>, but I don't really think this applies here because I'm using the Jest and Puppeteer Apis, which I assume are wrappers for native Javascript functions. </p>

<p><strong>Question:</strong> Do any of you Jest/Puppeteer hackers know of the proper way to document tests? Thank you in advance!</p>
",https://stackoverflow.com/questions/57464100/is-there-a-conventional-way-to-document-jest-puppeteer-test-suites,"['javascript', 'jestjs', 'puppeteer']",265,True,2,1
How to integrate mocking framework with Specflow,"<p>I am looking to do some end to end testing using specflow.</p>

<p>I have a windows service that picks up various files, does some processing, prints out those files and then moves said files to a success or failed archive folder.</p>

<p>I don't want to actually print the files out during my tests so thought that instead I could use a mocking framework to mock the result of the print operation for my tests.</p>

<p>I have used a number of mocking frameworks for my unit testing in the past but not used one alongside specflow.</p>

<p>I am not sure the best/easiest way to integrate the two. I have seen mention of creating a specflow binding file and use the [beforescenario] tag to initialise and do my mocking code in that method.</p>

<p>Would this work? Is there anything else I would need to do? Is there a better solution?</p>

<p>Rough example of test</p>

<pre><code>@BizTalk
Feature: Printing_Push
    Tests Printing

Background:
    Given all test data is stored under C:\TestData\XXXXXXXXXXXX

@HappyFlow
@SysTest
Scenario: Printing_HappyFlow_Success
    When the file is copied
        | Property      | Value                            |
        | Source File  | XXXXXXXXXXXXXXXXXXXX.dat                        |            
        | Target Folder | C:\Temp\XXXXXXXXX  |
    Then 1 files expected with extension dat will appear in the C:\xxxxxxxxxxxxxx folder within 10 seconds.
</code></pre>

<p>A filesystem watcher picks up the file. It is then processed before being printed and then the file is moved to an archive folder. The test will initiate this process by dropping file into expected file location. The test does not directly call the code.</p>
",https://stackoverflow.com/questions/57182705/how-to-integrate-mocking-framework-with-specflow,"['c#', 'unit-testing', 'mocking', 'integration-testing', 'specflow']",785,False,0,0
Dynamic browser resolution for Protractor testing,"<p>my question concerns end to end testing scenario involving a responsive web app. I have written my test scenario for the pages to test with different test cases depending on the screen resolution. I am using array variables to store the different selectors linked to the same element, for example:</p>

<pre><code>  it('should display the log in page', function () {
    gVar.signInButton = element(by.css(gVar.signInButtonSelector[gVar.SelectedMode]));
    gVar.signInButton.click().then(function(){
      expect(element(by.css(gVar.titleLoginPageSelector[gVar.SelectedMode])).getText()).toEqual(gVar.titleLoginPage[i]);
    });
</code></pre>

<p>Here I am trying to select the login page title to test it. Depending on the resolution, only the selector is different, and I stored them in arrays...</p>

<p>In my conf.js I have a parameter variable that I use in the command line to set the configuration I want to use:</p>

<pre><code>    exports.config = {
    //...

      params:{
            resolutionConfig:'default'
            },  

    //...
    }       
</code></pre>

<p>the run command can go:</p>

<p><code>protractor conf.js --params.resolutionConfig=Classic</code> or</p>

<p><code>protractor conf.js --params.resolutionConfig=Mobile</code> or</p>

<p><code>protractor conf.js --params.resolutionConfig=Tablet</code> ...</p>

<p>(Then I have a matching table to associate this parameter to the above integer value: gVar.SelectedMode)</p>

<p>What I would like to do now, is to set different resolutions values for my browser, a different one for each value of resolutionConfig parameter I am testing. So far, I know how to set that resolution with hardcoded values:</p>

<pre><code>    exports.config = {
    //...

    capabilities: {
        browserName: 'chrome',
        chromeOptions: {
            args: ['--window-size=100,100'] // THIS!
        }

    //...
    }       
</code></pre>

<p>I have heard of ""multicapabilities"" to run parallel tests, but it is not exactly what I want… is it possible to have the resolution parameters in variable and add a logic to it? Something like:</p>

<pre><code>    if(resolutionConfig) is ""mobile"" then: ['--window-size=xx,xx']; 
    if(resolutionConfig) is ""tablet"" then: ['--window-size=yy,yy'];
</code></pre>
",https://stackoverflow.com/questions/55370438/dynamic-browser-resolution-for-protractor-testing,"['testing', 'configuration', 'protractor']",359,True,0,1
How to use Selenium and Java to interact with dynamic web element?,"<p>I want to use Selenium to interact with an element on a website. This element contains further content depending on the user's behavior, but obviously has exactly one HTML-element the whole time.</p>

<p>The element looks like this when the mouse is not on top of it:</p>

<p><a href=""https://i.stack.imgur.com/Xg19E.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/Xg19E.png"" alt=""element without mouse on top""></a></p>

<p>When the mouse is on top of it, it looks like this:</p>

<p><a href=""https://i.stack.imgur.com/hpxKC.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/hpxKC.png"" alt=""element with mouse on top""></a></p>

<p>When the user clicks on the down arrow, other content is visualized:</p>

<p><a href=""https://i.stack.imgur.com/HUHt2.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/HUHt2.png"" alt=""more dynamic content""></a></p>

<p>As you can see it contains even more logic, I didn't add screenshots for it though.</p>

<p>The corresponding HTML code is that, nothing more:
<a href=""https://i.stack.imgur.com/H1E5Q.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/H1E5Q.png"" alt=""html code of element""></a></p>

<p>I do not know how this content is created. Does anybody know how I can use Selenium and java to interact with that web element? Selenium is obviously restricted to HTML content - what can I do without trying any dirty hacks like positioning the mouse at a certain position on the element myself to trigger the different visualization?</p>

<p><strong>Update</strong>
I want to do automated end-to-end testing. That means I need to programmatically use the buttons of the web element as a user would:</p>

<ol>
<li>Delete the date by clicking the x button</li>
<li>Alter the date by clicking up and down buttons</li>
<li>Alter the date by using the calender component</li>
<li>Changing the text in the web element (I guess I might already be able to do that with my current knowledge of Selenium)</li>
</ol>
",https://stackoverflow.com/questions/58659700/how-to-use-selenium-and-java-to-interact-with-dynamic-web-element,"['java', 'selenium', 'web-applications', 'automated-tests']",146,True,0,1
Advice on functional React best practices,"<p>I started working with React a few months ago. Coming from an Angular background it took a bit to get used to react concepts but I started enjoying it super fast.
Over the past two months I have refactored some class based components to functional components using React hooks. I am looking for advice on some best practices here since I am fairly new to functional hooks and there is not a whole lot of solid opinions on best practices. Here are a few</p>

<ol>
<li><p>With regards to “unit” testing. the instance in functional React does not exist. I can’t call a function and test it independent of other methods. React now suggests that “we recommend using react-testing-library which is designed to encourage writing tests that use your components as the end users do.” This approach seems more like end to end testing to me. I have certain functions that that do a number of calculation and save to state without any visual changes and re-rendering. How should I test those functions? </p></li>
<li><p>I have read that I need to  move some of my functions outside of the main exported function and call them in order to have them return a value to update the state with. Is this good practice? Should I export all of these outside functions in order to be able to test them or is this bad practice? If not how do I get to test these pure functions. I have created a very simple example of the pattern I am talking about here 
<a href=""https://codesandbox.io/embed/busy-currying-v09bb"" rel=""nofollow noreferrer"">https://codesandbox.io/embed/busy-currying-v09bb</a> </p></li>
</ol>

<p>I would love to know your opinions and how you have managed to solve these problems. Any thoughts or insight
Is much appreciated.</p>
",https://stackoverflow.com/questions/56566367/advice-on-functional-react-best-practices,['reactjs'],309,True,0,1
xUnit parallelism and environment variables,"<p>I have a bunch of xUnit tests to test various behaviours of a class whose behaviour is determined by environment variables.
This isn't the problem. The problem is that environment variables are per-process, not per-thread, and the tests interfere with each other when run in parallel.
Other than adding in mutexes etc., I've yet to find any way to control the parallelism for when the full suite of tests is run through visual studio (I know it can be done when run from command line, but that's not how most developers are going to work).
There's obviously several possible solutions, including using something like the Fakes library to monkey patch the behaviour of Environment.GetEnvironmentVariable, or even re-writing the code under test to allow substituting in a different method of obtaining configuration settings, but it does seem like there should be an easier way.</p>

<p>Actually as it happens the only test that's really giving me grief is a specific test that's only ever meant to be run individually as needed to do some end-to-end testing (e.g. it sends out real emails etc.), but xUnit doesn't appear to provide a way to check for that either, which is a little annoying - in fact the way we prevent it from running as part of the ci build is to check that it's on a Windows machine as for now, individual devs generally work on Windows and ci runs on macs and linux boxes! The other option I'd considered was to have the test be skipped if you didn't have a debugger attached, but it's handy just to be able to 'run' it w/o debugging and see that it does everything expected.</p>

<p>Surely there are other developers out there that have had similar challenges?</p>
",https://stackoverflow.com/questions/58552000/xunit-parallelism-and-environment-variables,"['.net', 'visual-studio', 'unit-testing', 'xunit']",344,False,0,0
Integration testing a fetch calls in a node module,"<p><strong>Goal:</strong> Call a function that invokes a fetch call to validate it works with my backend rest-api (end to end testing basically).</p>

<p><strong>Project:</strong> node module built to be imported into several react web application. The module contains only fetch calls and minimal logic. Its basically a glorified wrapper for URLs and settings. Created to cut down work required to implement common end points used in applications.</p>

<p><strong>Setup:</strong> I have a docker compose building a docker test container and pulling in my rest-api docker image (built in a different system). The test container pulls in the packed module and installs it with dependencies. Then it brings up the tests alongside the backend + other images needed for the backend (DB, login system, etc).</p>

<p><strong>Problem:</strong> How to implement the tests to handle the calls. </p>

<p>Currently I've tried calling the fetch methods directly. This works for my login fetch but any additional call fails to send the cookie. As far as I understand the code I have depends on the browser for the cookie. I've tried several solutions to get said cookie but i've been unable to get fetch of node-fetch to send it properly. My best guess is each test was creating a new cookie but I lack the knowledge to full debug this solution path.</p>

<p>my send solution path was to attempt to use puppeteer to load a fake page and then evaluate the function in page following examples like:
<a href=""https://github.com/puppeteer/puppeteer/issues/2579"" rel=""nofollow noreferrer"">https://github.com/puppeteer/puppeteer/issues/2579</a>
<a href=""https://stackoverflow.com/questions/53676445/how-to-use-imported-function-inside-page-evaluate-in-puppeteer-with-jest"">How to use imported function inside page.evaluate in Puppeteer with Jest?</a></p>

<p>Problem with this is the tests kept failing to load libraries required or some other problem.</p>

<p><strong>Code:</strong></p>

<p>Here is the call I'm trying to test for the most part. Each function I have wraps around this providing {url: ""api/endpoint/path"", method: ""GET""}. With some passing in a body for larger data posts. </p>

<pre><code> export function request(options) {

    //Build options
    options = {
        headers: {
            'Content-Type': 'application/json'
        },
        ...options
    };

    return fetch(options.url, options)
        .then(response =&gt; {
            //...

            //Handle errors
            if (!response.ok) {
                return Promise.reject(`${response.status} - ${response.statusText}`);
            }

            try {
                return response.json();
            } catch (e) {
                if (e.name === 'SyntaxError') {
                    return Promise.reject(response.text());
                }
            }
        });
}
</code></pre>

<p>Test example i've tried:</p>

<pre><code>import puppeteer from ""puppeteer"";
import {myCall} from ""my-rest-bridge"";

it('Check response', async () =&gt; {

    //Load browser
    const browser = await puppeteer.launch({
        headless: true,
        args: ['--no-sandbox']
    });
    const page = await browser.newPage();

    //Load page
    await page.goto('http://docker:8888/index.html');

    //Do login
    expect(await page.evaluate(() =&gt; login('user', 'password')).toBe(expectedUserResponseJson);

    //Make call
    expect(await page.evaluate(() =&gt; myCall(input1, input2)).toBe(expectedCallResponseJson);

    //Close page
    await page.close();
})

</code></pre>
",https://stackoverflow.com/questions/59399272/integration-testing-a-fetch-calls-in-a-node-module,"['reactjs', 'rest', 'docker', 'node-fetch']",278,True,0,1
