title,body,link,tags,view_count,is_answered,score,answer_count
End-to-end testing of distributed applications,"<p>Consider there is a new scenario/workflow and I want to test it for the whole enterprise. This implies I have to create a separate testing environment where all services will be deployed.</p>

<p><strong>But how do I specify which branches of every repository must be built and deployed? What are the automation options?</strong></p>

<p>Let it be two repositories for the services <code>A</code> and <code>B</code>.
How many testing environments do I need?</p>

<ul>
<li><code>A.master-B.master</code> </li>
<li><code>A.master-B.feature</code> </li>
<li><code>A.feature-B.master</code></li>
<li><code>A.feature-B.feature</code></li>
</ul>

<p>It seems like some combinations may be unnecessary. For example if features of <code>A</code> and <code>B</code> are unrelated, <code>A.feature-B.feature</code> can be omitted.</p>

<p>So for every branch of repository <code>X</code> we at least should test integration with currently deployed versions of services. It is a regression testing. And it is more or less clear how to automate it as we do not need to change the configuration. Just build <code>X.featureN</code> get other currently deployed artefacts, deploy them to new environment, test. Do it regularly. Profit!   </p>

<p>But what about testing new scenario being developed?</p>

<p>In that case the set of branches for build and deployment must be provided explicitly. On the other hand each service has its own schedule, and feature branch is usually deleted after being merged into master. Can tags help here? We either find tag in master or in a feature branch (hopefully in a single one).</p>
",https://stackoverflow.com/questions/47348848/end-to-end-testing-of-distributed-applications,"['continuous-integration', 'integration-testing', 'distributed-computing', 'end-to-end']",54,FALSE,1,0
End to end testing of two or more mule applications,"<p>I have multiple mule applications forming one big application. Individual components have been tested but when it comes to automate end to end testing we are finding a way for it.</p>

<p>Application 1 takes an input, processes it and send the processed object to application 2 which processes the input and sends to application 3, output of third application is the final result.</p>

<p>I want to validate the integration among the application 1-2 and 2-3 and then 1-3 also, so that we can easily test whenever there are more applications added to the main application.</p>

<p>Can anyone help me out on this, are there any tools which can be used to test this inside or outside anypoint studio?</p>

<p>Thanks in advance.</p>
",https://stackoverflow.com/questions/44891561/end-to-end-testing-of-two-or-more-mule-applications,"['mule', 'mule-studio', 'anypoint-studio']",239,FALSE,0,4
getting error while working with webdriver on an end to end testing,"<p>I was trying to create an end to end testing using Chimp. In front end there are few inputs(type=text) and my task was to set few values on that input field. Using webdriver.io i tried to select the id of inputs set there values by using setValue. but could not succeed. </p>

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

<pre><code>var assert = require('chai').expect;
var should = require('chai').should();

var webdriverio = require('webdriverio');     


describe('Page title', function () {



    it('should @watch', function () {


        browser.url( 'http://localhost:3090/admin/createUser' );
        browser.setValue( '#usernameInput', 'Seeking Wisdom' );



    });
</code></pre>

<p>but nothing appeared in the input section. then i tried to do it with jquery :</p>

<pre><code> import $ from ""jquery"";

var assert = require('chai').expect;
var should = require('chai').should();

var webdriverio = require('webdriverio'); var options = {}; var browser=webdriverio.remote(options)

describe('Page title', function () {



    it('should @watch', function () {


        browser.url( 'http://localhost:3090/admin/createUser' );
        var selectBox = $('#usernameInput');
        browser.setValue( 'selectBox', 'Seeking Wisdom' );


        console.log(selectBox.getValue()); 
    });

});
</code></pre>

<p>but still its not working and getting this error.</p>

<pre><code>Error: jQuery requires a window with a document
  at module.exports (node_modules/jquery/dist/jquery.js:31:12)
  at Context.&lt;anonymous&gt; (tests/test.js:24:25)
  at /home/shahin/.npm-packages/lib/node_modules/chimp/dist/lib/utils/fiberize.js:29:22
</code></pre>

<p>can anybody please tell me what really going on here?</p>
",https://stackoverflow.com/questions/47783899/getting-error-while-working-with-webdriver-on-an-end-to-end-testing,"['javascript', 'meteor', 'webdriver']",39,FALSE,2,0
Firefox 57 does not load geckoservice in Selenium during end-to-end testing,"<p>I am trying to load Firefox to test my web application using selenium. I am getting <code>SessionNotCreatedError: Unable to create new service: GeckoDriverService</code> error when I specify firefox in the <code>capabilities</code>. Here is how it looks like:</p>

<pre><code>var config = {
 sauceUser: process.env.SAUCE_USERNAME,
 sauceKey: process.env.SAUCE_ACCESS_KEY,
 framework: 'jasmine2',
 capabilities: {
  browserName: 'firefox',
  version: '57.0', 
  'screenResolution': '1920x1440'
 },
 specs: [
  '*.spec.js'
 ],
  jasmineNodeOpts: {
   showColors: true,
   defaultTimeoutInterval: 300000,
   print: function() {}
 },
  params: {
     defaultTimeout: 15000
 }
};
</code></pre>

<p>Here are details of my environment:</p>

<pre><code>OS: Ubuntu 16.04 LTS 64bit
Firefox: Quantum 57 64 bit
Selenium: 3.7.1
webdriver-manager: 12.0.6
gecko driver: 0.19.1
Protractor: 5.2.0
</code></pre>

<p>When I ran my protractor End-to-End test cases it throws this error:</p>

<pre><code>[13:14:58] E/launcher - SessionNotCreatedError: Unable to create new service: GeckoDriverService
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.10.0-38-generic', java.version: '1.8.0_151'
Driver info: driver.version: unknown
    at Object.checkLegacyResponse (/home/dev/node_modules/selenium-webdriver/lib/error.js:546:15)
    at parseHttpResponse (/home/dev/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/home/dev/node_modules/selenium-webdriver/lib/http.js:441:30)
    at &lt;anonymous&gt;
    at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/home/dev/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
    at Function.createSession (/home/dev/node_modules/selenium-webdriver/firefox/index.js:521:41)
    at createDriver (/home/dev/node_modules/selenium-webdriver/index.js:170:33)
    at Builder.build (/home/dev/node_modules/selenium-webdriver/index.js:632:16)
    at Local.getNewDriver (/home/dev/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
    at Runner.createBrowser (/home/dev/node_modules/protractor/built/runner.js:195:43)
    at q.then.then (/home/dev/node_modules/protractor/built/runner.js:339:29)
    at _fulfilled (/home/dev/node_modules/protractor/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/home/dev/node_modules/protractor/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/home/dev/node_modules/protractor/node_modules/q/q.js:796:13)
[13:14:58] E/launcher - Process exited with error code 199
</code></pre>

<p>I tried using updated versions of <em>selenium</em> and <em>gecko driver</em> but that did not help either.</p>

<p>I added <code>marionette: true</code> but still getting the same error. I also tried <code>""javascriptEnabled"": true, ""acceptSslCerts"": true</code> but with no success.</p>
",https://stackoverflow.com/questions/47401348/firefox-57-does-not-load-geckoservice-in-selenium-during-end-to-end-testing,"['selenium', 'firefox', 'protractor', 'geckodriver']",2269,FALSE,1,1
How to start browserstack locale as a background process in jenkins using WINDOWS for protractor end to end testing in jenkins,"<p>Can anyone please help me to  start browserstack locale as a background process in jenkins using WINDOWS  for protractor end to end testing .</p>

<p>I was going through this link but this is for linux,I need for windows .
<a href=""https://janmolak.com/jenkins-2-0-pipelines-and-browserstack-bd5a4ed3010d#.gf9pxyhgc"" rel=""nofollow noreferrer"">https://janmolak.com/jenkins-2-0-pipelines-and-browserstack-bd5a4ed3010d#.gf9pxyhgc</a>
I have already installed browserstack binary for win 32 in jenkins.</p>
",https://stackoverflow.com/questions/42827757/how-to-start-browserstack-locale-as-a-background-process-in-jenkins-using-window,"['jenkins', 'browserstack']",1106,FALSE,0,2
Why should I write unit tests if I already have E2E tests,"<p>If we're already doing <a href=""https://www.techopedia.com/definition/7035/end-to-end-test"" rel=""noreferrer"">E2E (end-to-end)</a> testing do we also need to write unit tests? </p>

<p>Considering we are doing all functional testing in end-to-end testing, what are the pros and cons of doing both?</p>
",https://stackoverflow.com/questions/47483097/why-should-i-write-unit-tests-if-i-already-have-e2e-tests,"['unit-testing', 'end-to-end']",1822,TRUE,4,2
Airflow Python Unit Test?,"<p>I'd like to add some unit tests for our DAGs, but could not find any. Is there a framework for unit test for DAGs? There is an End-to-End testing framework that exists but I guess it's dead: <a href=""https://issues.apache.org/jira/browse/AIRFLOW-79"" rel=""noreferrer"">https://issues.apache.org/jira/browse/AIRFLOW-79</a>. Please suggest, Thanks!</p>
",https://stackoverflow.com/questions/45418285/airflow-python-unit-test,"['python', 'airflow']",9540,TRUE,28,2
Is it possible to get JavaScript code coverage from protractor and make it into Istanbul report,"<p>Background:
I am working on a AngularJS Project that has 3 kinds of automated testing.
unit testing using jest,
end to end testing using protractor
end to end testing using robot framework</p>

<p>What we want now is to combine code coverage result from jest,protractor and robot framework. and merge it into a single Istanbul report</p>

<p>I would like to ask if 
1. Is it possible to get code coverage results from protractor?
2. Is it appropriate to the things I mention above? Are we supposed to put end to end test into code coverage? </p>
",https://stackoverflow.com/questions/46582376/is-it-possible-to-get-javascript-code-coverage-from-protractor-and-make-it-into,"['angularjs', 'protractor', 'code-coverage', 'e2e-testing', 'istanbul']",332,TRUE,0,1
Custom headers with protractor,"<p>I'm end-to-end testing my angular application. </p>

<p>The backend needs a custom header to work. Is there a way to set custom headers for all the requests that the browser makes?</p>
",https://stackoverflow.com/questions/46703078/custom-headers-with-protractor,"['angular', 'protractor']",376,FALSE,0,0
ProtractorTestResults.trx file is not generating in angular testing report,"<p>I am new in end-to-end testing, I am generating the report for my E2E test cases my code in config is </p>

<pre><code>  onPrepare: 
function () {

  require('protractor-trx-reporter');
  jasmine.getEnv().addReporter(
  new jasmine.TrxReporter('ProtractorTestResults.trx'));

}
</code></pre>

<p>already install protractor-trx-reporter via npm but still not able to get the ProtractorTestResults.trx file.</p>
",https://stackoverflow.com/questions/45147937/protractortestresults-trx-file-is-not-generating-in-angular-testing-report,"['angularjs', 'protractor', 'angularjs-e2e']",138,FALSE,0,0
Aurelia/Gulp- Protractor e2e config file2,"<p>Currently I am using Aurelia Esnext skeleton to build off my application. For end to end testing is there a way to use protractor's config file specs/suites arguments instead of the gulp task running all specs in alphabetical format?</p>

<pre><code>gulp.task('e2e', ['build-e2e'], function(cb) {
   return gulp.src(paths.e2eSpecsDist + '**/*.js')
      .pipe(protractor({
         configFile: 'protractor.conf.js',
         args: ['--baseUrl', 'http://127.0.0.1:9000', '--inspect']
      }))
      .on('end', function() {
         process.exit();
      })
      .on('error', function(e) {
         throw e;
      });
});
</code></pre>
",https://stackoverflow.com/questions/46244556/aurelia-gulp-protractor-e2e-config-file2,"['aurelia', 'e2e-testing', 'gulp-protractor']",75,FALSE,0,0
Tool to test a BigData Pipeline performance end to end?,"<p>I have this pipeline: Kafka->Logstash->ElasticSearch->Kibana</p>

<p>I have found a producer performance tool that can be invoked with the script “ bin/kafka-producer-perf-test.sh”.</p>

<p>I am wondering if anyone had any suggestions for testing performance end-to-end testing? </p>

<p>Thanks.</p>
",https://stackoverflow.com/questions/45007184/tool-to-test-a-bigdata-pipeline-performance-end-to-end,"['performance', 'elasticsearch', 'apache-kafka', 'logstash', 'kibana']",175,TRUE,1,1
What is the difference between Cucumber and Protractor?,"<p>So I have written an Angular app and I want to implement end-to-end testing, so I searched the internet for a tool. I found out that Protractor and Cucumber are two popular tools that do that, but I am confused as to  what is the difference between them.</p>
",https://stackoverflow.com/questions/42132396/what-is-the-difference-between-cucumber-and-protractor,"['javascript', 'angularjs', 'protractor', 'e2e-testing', 'cucumberjs']",8475,TRUE,7,3
How to test the Business logic of an application developed using Angular2?,"<p>I am looking for a solution considering End to End Testing of my application, more specifically testing the business logic developed using Angular2.</p>

<p>I will give some more details. I am using:
-Selenium using C# for the UI tests.
-Fitnesse for Back-end testing.</p>

<p>Thank you for all your suggestions.</p>
",https://stackoverflow.com/questions/44718838/how-to-test-the-business-logic-of-an-application-developed-using-angular2,"['angular', 'testing', 'automation', 'protractor']",133,FALSE,0,0
Getting concurrently scripts to complete,"<p>I am trying to create a script to run an end-to-end testing suite. I am currently using concurrently and the angular cli, like so:</p>

<pre class=""lang-json prettyprint-override""><code>""e2e"": ""concurrently \""ng e2e --proxy-config proxy.conf.json\"" \""cross-env NODE_ENV=development node server\"""",
</code></pre>

<p>It runs fine, but my issue is that obviously whilst the <code>ng e2e</code> command completes, my backend server does not. Is there any way to get the whole command to finish when the tests are complete?</p>
",https://stackoverflow.com/questions/44485306/getting-concurrently-scripts-to-complete,"['angular-cli', 'e2e-testing', 'npm-scripts']",1555,TRUE,9,1
What is the use of custom locators in Protractor?,"<p>I am new to protractor end to end testing tool. I want to know that, </p>

<ol>
<li><p>What is the use of custom locators in Protractor?</p></li>
<li><p>When should we use them?</p></li>
<li><p>Any Example would be much appreciated?</p></li>
</ol>

<p>I have searched in google but nothing more useful found, that can make some understanding about them.</p>
",https://stackoverflow.com/questions/46361652/what-is-the-use-of-custom-locators-in-protractor,"['protractor', 'elementor']",861,TRUE,0,1
Nightwatch with Jquery integration fails with the error jQuery requires a window with a document,"<p>i am using nightwatch for end to end testing, i am facing one issue while using jQuery with night-watch.</p>

<p>While running this test case i am getting error like:</p>

<blockquote>
  <p>jQuery requires a window with a document</p>
</blockquote>

<p>Could you please let me know the reason .ad also i have included the JQquery library like this:</p>

<pre><code>var $ = require('jquery').
browser.perform(function(dir)){
var flag = `$`('span').hasClass('red'); //throws error 
}
</code></pre>
",https://stackoverflow.com/questions/47752523/nightwatch-with-jquery-integration-fails-with-the-error-jquery-requires-a-window,"['jquery', 'nightwatch.js']",235,FALSE,0,1
How to unit test the right way with MochaJS in AngularJS,"<p>I am new to Unit testing with MochaJS. So, I need some help of my unit testing code that I tested my app. But, for some reason I am getting <code>TypeError: module is not a function</code> . Also, does any one know any good tutorials on unit testing or end-to-end testing? Thanks for your help. </p>

<blockquote>
  <p>Here is my unit test </p>
</blockquote>

<pre><code>    describe('Testing AngularJS Test Suite', function(){
describe('Testing AngularJS Controller', function(){

    it('should initialize the update user in the scope', function(){

    module('Portal');

    var scope = {};
    var ctrl;

    inject(function($controller){

        ctrl = $controller('HomeController', {$scope:scope});


    });

    expect(scope.title).toBeDefine();  
    expect(scope.title).toBe('Portal');  




    });




});
}); 
</code></pre>
",https://stackoverflow.com/questions/44665067/how-to-unit-test-the-right-way-with-mochajs-in-angularjs,"['angularjs', 'unit-testing', 'mocha.js', 'karma-mocha']",201,FALSE,0,0
Protractor element not clickable at some point? But same element receiving its click event?,"<p>I am doing end to end testing using protractor. I am getting an error like</p>

<pre><code>Failed: unknown error: Element 
&lt;button type=""button"" ng-click=""onGPlusBtnPress()"" class=""btn btn-lg 
btn-google btn-block""&gt;...&lt;/button&gt; 
is not clickable at point (919, 241). Other element would receive 
the click: 
&lt;button type=""button"" ng-click=""onGPlusBtnPress()"" class=""btn btn-lg 
btn-google btn-block""&gt;...&lt;/button&gt;
</code></pre>

<p>It seems that the error is telling that same element is receiving click event, then why it is not working. there are no other clickable elements overlapping on it.</p>

<p>What should be done to resolve the problem?</p>

<p><a href=""https://i.stack.imgur.com/NCReq.png"" rel=""nofollow noreferrer"">see web page design here</a></p>
",https://stackoverflow.com/questions/43086399/protractor-element-not-clickable-at-some-point-but-same-element-receiving-its-c,"['angularjs', 'testing', 'protractor']",449,FALSE,1,1
Integration testing Android,"<p>I'm new to testing on Android. I see a lot of articles and tutorial about unit testing and with end-to-end testing (with espresso). It's ok. But what about integration testing ?</p>

<p>For the exemple, I use Firebase Database for my app. Is it possible to do this kind of test in the instrumentation test :</p>

<pre><code>@Test
public void tryFirebaseTest() throws FieldRequiredException, InvalidPhoneException, InvalidEmailException, InterruptedException {

    UserManager userManager = new UserManager(new FIRUserStorage(FirebaseDatabase.getInstance().getReference()));
    userManager.createUser(""test@test.com"", ""test"", ""+4778787"", """", new CreateUserCallback() {
        @Override
        public void userCreated(User user) {
            assertNotNull(user);
        }

        @Override
        public void userExistError() {
            fail();
        }

        @Override
        public void userDatabaseError(String errorMessage) {
            fail();
        }
 });

}
</code></pre>

<p>In this case, the test don't get in the callback.</p>
",https://stackoverflow.com/questions/41585530/integration-testing-android,"['android', 'unit-testing', 'testing', 'integration-testing', 'android-testing']",547,FALSE,0,1
Unable to check for status indicator in protractor,"<p>I'm working on protractor for end to end testing and need to check for status indicator to disappear before clicking on a button. Right now I'm unable to do it.
I have tried to use <code>invisibilityOf()</code> as well as <code>stalenessOf()</code> but it's not working. It shows error ' is not clickable at point (540,823), Other element would receive the click: &lt;#api-status-indicator>'</p>

<p><strong>Here's my code in PageObject:</strong></p>

<pre><code>public isNotPresent(elem) {
    return browser.wait(protractor.ExpectedConditions.stalenessOf(elem), 5000).then(function () {
        console.log(""Status indicator is not present in DOM"");
        return true; //success
    },function () {
        console.log(""Status indicator is present in DOM"");
        return false; //Failure
    });
}

public waitForStatusIndicator(){
    console.log('in method wait for status indicator');
    return this.isNotPresent(element(by.css('#api-status-indicator'))).then((isNotPresent)=&gt;{
        return isNotPresent;
    });
}
</code></pre>

<p><strong>Here's where I'm trying to check for status indicator:</strong></p>

<pre><code>PageObject.waitForStatusIndicator().then(function (isNotPresent) {
       if(isNotPresent == true) {
       someButton.click();
       return expect(browser.getCurrentUrl()).not.toBe(browser.baseUrl + ""/login"");
      }
})
</code></pre>

<p>Where am I going wrong?</p>
",https://stackoverflow.com/questions/47348066/unable-to-check-for-status-indicator-in-protractor,"['angular', 'typescript', 'testing', 'protractor', 'end-to-end']",82,TRUE,0,1
nightwatch Error &quot;Error: ENOENT: no such file or directory .../examples/pages&quot;,"<p>I am starting to use nightwatch (followed this tutorial -
 <a href=""https://blog.risingstack.com/end-to-end-testing-with-nightwatch-js-node-js-at-scale/"" rel=""nofollow noreferrer"">https://blog.risingstack.com/end-to-end-testing-with-nightwatch-js-node-js-at-scale/</a>)</p>

<p>I created a folder in ""/Users/luisfranqueira/fyde/experiments""
And inside I have the structure: 
/bin /reports /tests nightwatch.json</p>

<p>when running the tests follow all instructions in the tutorial - I run the command ""npm run test-e2e""</p>

<p>I get the following error:</p>

<pre><code>&gt; @ test-e2e /Users/luisfranqueira
&gt; nightwatch


There was an error while starting the test runner:

Error: Cannot read source folder: /Users/luisfranqueira/examples/tests
    at /Users/luisfranqueira/node_modules/nightwatch/lib/runner/run.js:203:21
    at /Users/luisfranqueira/node_modules/nightwatch/lib/runner/walk.js:97:18
    at FSReqWrap.oncomplete (fs.js:152:21)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ test-e2e: `nightwatch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ test-e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/luisfranqueira/.npm/_logs/2017-12-05T12_23_49_345Z-debug.log
</code></pre>

<p><strong>I know that this is probably a miss configured path, however, I don't know where to change it....</strong></p>
",https://stackoverflow.com/questions/47653654/nightwatch-error-error-enoent-no-such-file-or-directory-examples-pages,"['node.js', 'automation', 'automated-tests', 'nightwatch.js']",732,FALSE,1,0
Using pact for a service with a sequence of requests and responses,"<p>Here is my use case:</p>

<p>My Service is: ServiceA.<br>
It depends on the following services: ServicesB and ServiceC.</p>

<p>ServiceA sends a POST request to ServiceB with some authentication details (username+password) and ServiceB replies back with a json document which has a sessionId. </p>

<p>Request:</p>

<pre><code>POST /authenticate
{
    ""username"": ""_at_api"",
    ""password"": ""xxx""
}
</code></pre>

<p>Response:</p>

<pre><code>{
    ""sessionId"": ""axy235da7ad5a24abeb3e7fbb85d0ef45f""
}
</code></pre>

<p>The above sessionId is used for all api calls from ServiceA to ServiceC.</p>

<p>ServiceA requests to serviceC to start a job using a POST request and serviceC returns with a job id(alphanumeric). </p>

<p>Request:</p>

<pre><code>POST /jobs/local/start
Header: Authentication: axy235da7ad5a24abeb3e7fbb85d0ef45f
{
    ...
}
</code></pre>

<p>Response:</p>

<pre><code>{
    ""status"": ""RUNNING"",
    ""jobId"": ""a209016e3fdf4425ea6e5846b8a46564abzt""
}
</code></pre>

<p>ServiceA keeps polling serviceC for the completion of the job using the jobId returned above:</p>

<p>Request:</p>

<pre><code>GET /jobs/status/a209016e3fdf4425ea6e5846b8a46564abzt
Header: Authentication: axy235da7ad5a24abeb3e7fbb85d0ef45f
</code></pre>

<p>Response:</p>

<pre><code>{
    ""status"": ""RUNNING""
}
</code></pre>

<p>The polling continues until the status is returned as COMPLETED or FAILED. </p>

<p>Response:</p>

<pre><code>{
    ""status"": ""COMPLETED""
}
</code></pre>

<p>How can I use <a href=""https://docs.pact.io"" rel=""nofollow noreferrer"">Pact</a> to test serviceA? </p>

<p>My plan is to use only unit tests and contract tests to achieve code coverage of more than 90%. Is it a good idea, or do I need to have a separate tests using virtual servers? My understanding is that Pact is a superset of virtual server (example: <a href=""http://www.mbtest.org/"" rel=""nofollow noreferrer"">mountebank</a>) and everything which a virtual server can do, Pact can do. And so I do not need a separate Component testing. Also, it looks like Contract testing completely replaces end-to-end testing, so I do not need end-to-end testing as well. Is this right?</p>
",https://stackoverflow.com/questions/47976094/using-pact-for-a-service-with-a-sequence-of-requests-and-responses,['pact'],1289,TRUE,1,2
Should Protractor can also be used for database testing directly?,"<p>As protractor is primarily for end-to-end testing, so to cover user like high level scenarios on the UI level, </p>

<blockquote>
  <p>should we use it to test database directly as well?</p>
</blockquote>

<p>by establishing db connectivity and firing queries to verify the database states may be before &amp; after the user actions in the UI ?</p>

<p>or </p>

<p>for plain direct db testing to check stored procedures to test business rules/functionality? </p>

<p>which one is the correct one, and what is the right way to use it with protractor?</p>
",https://stackoverflow.com/questions/41527135/should-protractor-can-also-be-used-for-database-testing-directly,"['database', 'protractor']",1657,TRUE,1,1
Automated testing with Smart Card authentication (selenium or other option?),"<p>We host hundreds of websites with smart card authentication (CAC authentication for those with DoD experience).  I need to build automated tests for these sites. In regular industry, I have used Selenium for end-to-end testing suites, but these websites I must test require smart card authentication.</p>

<p>When a user visits a site, the browser pops-up a window asking which certificate from the smart card to use.  This pop-up will prevent me from automating clicks within the DOM, right?  Is there a best practice to get around it?</p>
",https://stackoverflow.com/questions/47796598/automated-testing-with-smart-card-authentication-selenium-or-other-option,"['selenium', 'automated-tests', 'smartcard']",2112,TRUE,3,1
How can we perform headless testing for Protractor Testing in Jenkins or other CI integration tool?,"<p>I found out that it is not good to use PhantomJS to perform Protractor Testing , instead use Karma Testing. However I want to do end-to-end testing not unit testing. </p>

<p>End to End meaning I want to set commands which will make the browser acts like human user. Therefore I cannot switch back to Karma . I tried to use PhantomJS with Protractor as <code>browsername</code> but it doesn't seem work. If anyone can share knowledge on how to use PhantomJS and Protractor for Jenkins (CI) integration environment will be great help or any other headless browser you know of. </p>
",https://stackoverflow.com/questions/44965653/how-can-we-perform-headless-testing-for-protractor-testing-in-jenkins-or-other-c,"['continuous-integration', 'protractor', 'karma-runner', 'headless']",336,TRUE,0,1
How to automate the testing of a device with mechanical switches?,"<p>we need to do some automated end to end testing of our component chain, which consists of a number of windows services that talk to each other - these are easily tested (and we do it today), however at one end of the chain is some hardware, that is controlled by a human who presses various buttons that makes the software inside 'talk' to the rest of our component chain.</p>

<p>how can we automate the the button pressing? are there special m/c's that do that sort of thing?</p>

<p>does anyone do this sort of thing and how?</p>

<p>Many thanks.</p>
",https://stackoverflow.com/questions/45664965/how-to-automate-the-testing-of-a-device-with-mechanical-switches,"['testing', 'automation', 'components', 'end-to-end', 'hardware-interface']",29,FALSE,0,0
directConnect:true vs starting seleniumServer at some port in Protractor,"<p>I am using Protractor for end-to-end Testing with non-angular app.<br>
So Once I have written in protractor.conf.js file as-</p>

<pre><code>exports.config = {
      directConnect: true,

      // Capabilities to be passed to the webdriver instance.
      capabilities: {
        'browserName': 'chrome'
      },

      // Framework to use. Jasmine is recommended.
      framework: 'jasmine',

      // Spec patterns are relative to the current working directory when
      // protractor is called.
      specs: ['example_spec.js'],

      // Options to be passed to Jasmine.
      jasmineNodeOpts: {
        defaultTimeoutInterval: 30000
      }
    };
</code></pre>

<p>Then it works fine for me.<br>
After that I have made some changes like-</p>

<pre><code>exports.config = {
      seleniumAddress: 'http://localhost:4444/wd/hub',

      // Capabilities to be passed to the webdriver instance.
      capabilities: {
        'browserName': 'chrome'
      },

      // Framework to use. Jasmine is recommended.
      framework: 'jasmine',

      // Spec patterns are relative to the current working directory when
      // protractor is called.
      specs: ['example_spec.js'],

      // Options to be passed to Jasmine.
      jasmineNodeOpts: {
        defaultTimeoutInterval: 30000
      }
    };
</code></pre>

<p>Then It start with selenium server with port and test cases run successfully.</p>

<p>So My Question is that-
 What is the diffrence between both the ways? I know when we use <code>directConnect:true</code>, it does not start selenium server, then use chrome driver directly, and test cases run faster than other way?</p>

<p>When protractor can do testing without selenium server, why we need it?
What selenium server do in protrator testing?</p>
",https://stackoverflow.com/questions/46618472/directconnecttrue-vs-starting-seleniumserver-at-some-port-in-protractor,['protractor'],16485,TRUE,5,1
Localhost email for e2e email test,"<p>I need to test that an email has been received and preferably have the ablity to access the mailbox by a rest api. Im looking for an open source solution that i can install which will give me a local email address then i will get the application to send the email to the address where i can validate that it was received. Any ideas on solutions that can be used for the full end to end testing of emails would be appreciated. I know there are some internet based solutions out there but being a test environment the preference would be for a local solution.</p>

<p>Thanks</p>
",https://stackoverflow.com/questions/44352066/localhost-email-for-e2e-email-test,"['rest', 'email', 'junit', 'localhost']",141,TRUE,1,1
Unit testing for UI validation,"<p>Imagine a very simple <strong>Angular</strong> form with two input fields bound to two scope variables and a submit button which calls a controller function as to send the input data in the database. </p>

<p>My question is <strong><em>if unit testing may be applied to this scheme</em></strong>. Is it possible for example to test the UI - input validation? </p>

<p>My guess is no, since I think it must be applied <strong>end to end testing</strong> (e.g. Selenium).</p>

<p>I am struggling as to find an appropriate test: for example <em>how may I test not allow some characters inside an input field?</em> </p>

<blockquote>
  <p>Am I right to think that unit testing is only for testing the controller methods and the services' ones?</p>
</blockquote>
",https://stackoverflow.com/questions/42099384/unit-testing-for-ui-validation,"['angularjs', 'unit-testing', 'selenium', 'karma-jasmine']",613,TRUE,-1,1
How to store execution status of a specflow scenario when executed using Command Prompt,"<p>I'm trying to initiate the execution in a remote machine for which i want to get the execution status of a specflow scenario when executed using Command Prompt.
<strong>Note:</strong> I'm achieving this using TCPClient &amp; TCPListener approach.</p>

<p>In this approach, i would like to pass the scenario tag like testcase id as - @1234 via TcpClient and in TCPListener i will listen to that tag number and will pass down such that i will execute via command prompt.</p>

<p>Here, i would like to get the Scenario execution status like Pass, failed, pending... such that i can pass it back to TcpClient and i can complete end to end testing...</p>

<p>Thank You in Advance.</p>
",https://stackoverflow.com/questions/44847250/how-to-store-execution-status-of-a-specflow-scenario-when-executed-using-command,['specflow'],367,TRUE,0,1
How to point stripe-go to stripe-mock local server?,"<p>I am using <a href=""https://github.com/stripe/stripe-go#without-a-client"" rel=""nofollow noreferrer"">stripe-go</a> to perform Stripe actions such as create a new customer, add a credit card, create a subscription and so on. I want to perform end-to-end testing. There is <a href=""https://github.com/stripe/stripe-mock"" rel=""nofollow noreferrer"">stripe-mock</a> which is a mock HTTP server that responds like the real Stripe API. I have that running locally in a terminal. How do I point my stripe-go which I am using in my Go application to make calls to this mock HTTP server instead of the real Stripe API.</p>

<p>In the stripe-go documentation there is this </p>

<pre><code>// Setup
stripe.Key = ""sk_key""

stripe.SetBackend(""api"", backend) // optional, useful for mocking
</code></pre>

<p>Am I supposed to pass something special as <code>backend</code> so that stripe-go knows to then make calls to <a href=""http://localhost:12111"" rel=""nofollow noreferrer"">http://localhost:12111</a> which is the address of stripe-mock?</p>

<p>This is <code>stripe.SetBackend</code></p>

<pre><code>// SetBackend sets the backend used in the binding.
func SetBackend(backend SupportedBackend, b Backend) {
    switch backend {
    case APIBackend:
        backends.API = b
    case UploadsBackend:
        backends.Uploads = b
    }
}
</code></pre>

<p>This is <code>Backend</code></p>

<pre><code>// Backend is an interface for making calls against a Stripe service.
// This interface exists to enable mocking for during testing if needed.
type Backend interface {
    Call(method, path, key string, body *RequestValues, params *Params, v interface{}) error
    CallMultipart(method, path, key, boundary string, body io.Reader, params *Params, v interface{}) error
}
</code></pre>
",https://stackoverflow.com/questions/47528679/how-to-point-stripe-go-to-stripe-mock-local-server,"['go', 'integration-testing', 'stripe-payments']",1402,TRUE,4,1
Access Web Component&#39;s local DOM (from outside) and set value to its children,"<p>I have a web app which is developed using <strong>Polymer</strong> and want to implement end-to-end testing using JavaScript. That's why I am trying to programmatically set some value, but I'm unable to access the element's local DOM by either:</p>

<pre><code>document.getElementById('nativeInput'); 
document.querySelector('#nativeInput');
</code></pre>

<p><strong>Someone told me that it is not possible to access shadow-root elements directly and set a value on them</strong>. So my basic question is: How can I access an element's shadow DOM and set some value to its children?. Please let me know whether that is possible and if so, please share some solution.</p>

<p>See the screenshot to get a clearer understanding of what I am trying to accomplish, on the HTML element with my JavaScript selector, on <strong>#shadow-root (open)</strong>.</p>

<p><a href=""https://i.stack.imgur.com/CalHF.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/CalHF.png"" alt=""html element tree""></a></p>
",https://stackoverflow.com/questions/47516881/access-web-components-local-dom-from-outside-and-set-value-to-its-children,"['javascript', 'dom', 'polymer', 'shadow-dom']",1610,TRUE,4,3
Can Nightwatch be used to test Rails?,"<p>A contractor for our startup installed the Selenium-based Nightwatch testing framework, since our stack is React-heavy. But he told me that it could even be used to test our Rails code. A new contractor said, to the contrary, that Nightwatch couldn't do unit tests of our Rails controllers and models (which makes sense to me).</p>

<p>Who is right? Do you suppose the first programmer had in mind just that we would do end-to-end testing (certain inputs lead to certain outputs), and that we need not test the details of the Rails code? Do we, as I suspect and as the new contractor asserts, need RSpec or some other Ruby-based testing framework to handle our Rails code, if we want to be a TDD shop?</p>
",https://stackoverflow.com/questions/45047769/can-nightwatch-be-used-to-test-rails,"['ruby-on-rails', 'ruby', 'selenium', 'rspec', 'nightwatch.js']",569,TRUE,1,1
How to test a python binary in the python unit test?,"<p>I would like to test a python binary ""main.py"" with command line arguments in the unit test. The usage of this binary is as follows.</p>

<pre><code>main.py --input_file=input.txt --output_file=out.txt
</code></pre>

<p>When designing unit tests, I think it is better to test each component like a class or a method.</p>

<p>However, in some cases like the above one, I would like to do end-to-end testing of the whole python binary especially when it is already created by someone else. In the above case, I want to make it sure whether ""main.py"" generates ""out.txt"" correctly.</p>

<p>One option is using subprocess.check_call and create it to a temporary directory, and loads it and compares it with the golden (expected output).</p>

<p>Is it a good way?</p>

<p>Or, if there is any better way, could you please advise me?</p>
",https://stackoverflow.com/questions/45655629/how-to-test-a-python-binary-in-the-python-unit-test,"['python', 'unit-testing']",1015,TRUE,0,2
Testing real back end service with Angular 2 and Jasmine/Karma,"<p>I would like do some basic end to end testing between a test instance of my rails backend api an my Angular2 app. (that I am just starting).</p>

<p>I created the app with the cli and a service (also with the cli).
I added a method to the service to attempt to make a request and a spec to test it but I can see in the console for the Krama browser window the request is not going to the ip I would like it to go to, rather is is going to what appears to be the karma ""server"".</p>

<p>Is there any way I can direct http requests to a specific ip when using this setup?</p>

<h2>The service I would like to test</h2>

<pre><code>import { Injectable, Inject } from '@angular/core';
import { Http, Response } from '@angular/http';

import { Observable }     from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/share';

@Injectable()
export class RailsBackendService {

  private mainToken = ""some_api_access_token"";
  private tokenQueryKey = ""api_access_token"";

  constructor(private http: Http) { }

  get token(): string {
    return this.mainToken;
  }

  getUserList() : Observable&lt;any&gt; {
    console.log(""getting user list"");
    const querySting = `${this.tokenQueryKey}=${this.token}`;
    const requestURL = `http:172.16.1.114/api/v1/users/?${querySting}`;
    this.http.get(requestURL).subscribe();
    return this.http.get(requestURL);
  }

}
</code></pre>

<h2>The spec</h2>

<pre><code>import { TestBed, async, inject } from '@angular/core/testing';
import { HttpModule, Http } from '@angular/http';
import { RailsBackendService } from './rails-backend.service';
import { ReflectiveInjector } from '@angular/core';

describe('RailsBackendService', () =&gt; {

  beforeEach(() =&gt; {
    TestBed.configureTestingModule({
      imports: [HttpModule],
      providers: [RailsBackendService]
    });
  });

  it('should ...', inject([RailsBackendService], (service: RailsBackendService) =&gt; {
    expect(service).toBeTruthy();
  }));

  it('should exist', inject([RailsBackendService], (service: RailsBackendService) =&gt; {
    console.log('here2');
    expect(service.getUserList().subscribe( 
      (x) =&gt; {console.log(""next"",x);},
      (x) =&gt; {console.log(""error triggered"",x, ""error done"");},
      () =&gt; {console.log(""complete"",x);}
      )).toBe('x');
    }
  ));
});
</code></pre>

<h2>The console response</h2>

<p>Note the localhost:9876 in front of the desired ip address.</p>

<p><a href=""https://i.stack.imgur.com/H7O8s.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/H7O8s.png"" alt=""enter image description here""></a></p>
",https://stackoverflow.com/questions/42279952/testing-real-back-end-service-with-angular-2-and-jasmine-karma,"['angular', 'karma-jasmine']",763,TRUE,1,1
Cannot establish TLS connection between spring-ldap client and apacheds,"<p>My client code has successfully tested using LDAP protocol against embedded ApacheDS 1.5.5. In End-To-End testing using Apache DS 2.0.0-M23 I was successfully able to establish a LDAPS connection using OpenLDAP. However, I'm having problems using the Java-based spring-ldap to establish LDAPS connection. My code is based on spring-ldap. Any tips for digging deeper into TLS or LDAPS would really be appreciated.</p>

<p><strong>Versions</strong></p>

<p>Oracle JDK: java version ""1.8.0_92"" with JCE Unlimited Strength Jurisdiction Policy Files.</p>

<p>Spring-Ldap Version : 2.3.1.RELEASE</p>

<p>Spring Version : 4.3.2.RELEASE</p>

<p>Apache DS Version: 2.0.0-M23 deployed in a Docker Container.</p>

<p><strong>Creation of public certificate and private Keys</strong></p>

<p>Based on : <a href=""http://directory.apache.org/apacheds/basic-ug/3.3-enabling-ssl.html"" rel=""nofollow noreferrer"">Apache DS - Enable SSL</a></p>

<p>Export the certificate used on the LDAP Server:</p>

<pre><code>[jlee@iel-jlee-lt1 security]$ keytool -genkey -keyalg ""RSA"" -dname ""cn=tangotelecom.com, ou=dev, o=tangotelecom, c=IE"" -alias tangotelecom -keystore tangotelecom.ks -storepass secret -validity 730
Enter key password for &lt;tangotelecom&gt;
(RETURN if same as keystore password):
[jlee@iel-jlee-lt1 security]$ keytool -list -keystore tangotelecom.ks
Enter keystore password:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

tangotelecom, 06-Jul-2017, PrivateKeyEntry,
Certificate fingerprint (SHA1): 56:0C:5C:7A:DD:97:F1:4D:A2:B6:D1:2B:EC:D0:11:4A:B1:79:F3:CF

[jlee@iel-jlee-lt1 security]$ keytool -export -keystore tangotelecom.ks -alias tangotelecom -file tangotelecom.cer
Enter keystore password:
Certificate stored in file &lt;tangotelecom.cer&gt;
</code></pre>

<p>Import the public certificate into the cacerts file to be used by clients:</p>

<pre><code>[tango@iel-dev-tfsr-vm2 16:30:57 john]$ sudo keytool -import -trustcacerts -keystore /opt/java8/jre/lib/security/cacerts -storepass changeit -noprompt -alias tangotelecom -file /home/tango/john/tangotelecom.cer
[sudo] password for tango:
Certificate was added to keystore
</code></pre>

<p><strong>TLS DEBUG</strong></p>

<pre><code>Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false

%% No cached client session

*** ClientHello, TLSv1.2
RandomCookie:  GMT: 1500415942 bytes = { 188, 130, 166, 249, 170, 224, 174, 199, 55, 88, 195, 144, 45, 147, 143, 225, 45, 223, 30, 91, 195, 43, 83, 241, 197, 150, 41, 54 }
Session ID:  {}
Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
Compression Methods:  { 0 }
Extension elliptic_curves, curve names: {secp256r1, sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1}
Extension ec_point_formats, formats: [uncompressed]
Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA224withECDSA, SHA224withRSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA
Extension server_name, server_name: [type=host_name (0), value=tangotelecom.com]
***
Thread-8, WRITE: TLSv1.2 Handshake, length = 260

Thread-8, READ: TLSv1.2 Handshake, length = 1257
*** ServerHello, TLSv1.2
RandomCookie:  GMT: 1500416088 bytes = { 2, 142, 226, 16, 107, 183, 43, 206, 220, 107, 239, 113, 204, 172, 241, 154, 87, 185, 49, 94, 163, 9, 187, 229, 53, 41, 78, 254 }
Session ID:  {89, 111, 136, 88, 183, 123, 76, 181, 211, 21, 149, 160, 218, 222, 226, 244, 139, 145, 143, 72, 3, 7, 184, 96, 34, 155, 76, 54, 60, 117, 215, 179}
Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Compression Method: 0
Extension renegotiation_info, renegotiated_connection: &lt;empty&gt;
***
%% Initialized:  [Session-1, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384]
** TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
*** Certificate chain

chain [0] = [
[
  Version: V3
  Subject: CN=tangotelecom.com, OU=dev, O=tangotelecom, C=IE
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 2048 bits
  modulus: 22980180191390060691645191877521292031505114546367033225089259442617005098274762521554359946742065878415849288262185146512594592923140681158742168163906077539516435863146152603064701157961527256158756559349035940810739650464273192076580461817700601005238106947505955687153311906740088488389957201959449147054853786865353874624664733186248186940444317144962411956375681259742751499094173934719877768378414836567412356975874572170519318320962628133692056724599530776533547533308568698574604059550372476889963449850184432248569481738632894450321061794712987632959422197533269207285625710288277728878653909213375498707927
  public exponent: 65537
  Validity: [From: Thu Jul 06 15:48:29 IST 2017,
               To: Sat Jul 06 15:48:29 IST 2019]
  Issuer: CN=tangotelecom.com, OU=dev, O=tangotelecom, C=IE
  SerialNumber: [    6dce9c09]

Certificate Extensions: 1
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: E1 BA 73 DD F2 41 0F CF   BD 4B 9B 99 D7 01 BD 2F ..s..A...K...../
0010: 7D 9A 31 B7                                        ..1.
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:
0000: 2C DB 4A FA BD A9 1D 29   C0 0A 8F 69 7F 39 11 DA ,.J....)...i.9..
0010: 4A 21 0D 66 53 A5 03 CC   33 AB 4D E6 C1 55 75 E3 J!.fS...3.M..Uu.
0020: 8C 22 C6 F9 05 26 27 EF   BC C0 CB D8 12 3C 7C 95 .""...&amp;'......&lt;..
0030: 9B 56 88 06 71 CA 3A 17   99 6A 23 53 E9 CC 9B 05 .V..q.:..j#S....
0040: E6 85 89 25 DC CF 95 3A   41 62 5D 0C CE E9 0F D4 ...%...:Ab].....
0050: 7E 0E B6 4D CE 5A 49 F4   BB DD 9A 85 55 C1 39 0E ...M.ZI.....U.9.
0060: 0F B4 34 44 05 64 E5 F3   F0 4A 5C 40 91 2C 1E B3 ..4D.d...J\@.,..
0070: 39 D1 56 71 C2 83 48 CA   31 E5 44 60 B4 65 8D BA 9.Vq..H.1.D`.e..
0080: 70 65 7C 93 B8 84 E4 60   38 EA C7 21 7D AF 30 BD pe.....`8..!..0.
0090: 6F D5 CC 04 DA 33 E8 14   DA E8 AC BA 6A 03 5E C9 o....3......j.^.
00A0: 56 DC 78 07 FB 44 DB A8   B2 4D CE 30 CB 56 7E 6B V.x..D...M.0.V.k
00B0: F6 CE BF 3D B4 77 21 33   53 BA D8 E2 B1 B9 F4 95 ...=.w!3S.......
00C0: 05 7E FB B4 3A CF 09 29   10 B1 4E CF 38 AF 81 D6 ....:..)..N.8...
00D0: 6B DD 60 51 1C 04 27 41   71 98 07 DE B9 82 4A 1A k.`Q..'Aq.....J.
00E0: 0D F7 04 6D 09 F4 E7 1F   FE 2C 07 41 EE 84 F3 F6 ...m.....,.A....
00F0: 1A F4 62 87 3D 94 A6 5D   FD 3D 8B EE 1B A1 5B 52 ..b.=..].=....[R

]
***
Found trusted certificate:
[
[
  Version: V3
  Subject: CN=tangotelecom.com, OU=dev, O=tangotelecom, C=IE
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 2048 bits
  modulus: 22980180191390060691645191877521292031505114546367033225089259442617005098274762521554359946742065878415849288262185146512594592923140681158742168163906077539516435863146152603064701157961527256158756559349035940810739650464273192076580461817700601005238106947505955687153311906740088488389957201959449147054853786865353874624664733186248186940444317144962411956375681259742751499094173934719877768378414836567412356975874572170519318320962628133692056724599530776533547533308568698574604059550372476889963449850184432248569481738632894450321061794712987632959422197533269207285625710288277728878653909213375498707927
  public exponent: 65537
  Validity: [From: Thu Jul 06 15:48:29 IST 2017,
               To: Sat Jul 06 15:48:29 IST 2019]
  Issuer: CN=tangotelecom.com, OU=dev, O=tangotelecom, C=IE
  SerialNumber: [    6dce9c09]

Certificate Extensions: 1
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: E1 BA 73 DD F2 41 0F CF   BD 4B 9B 99 D7 01 BD 2F ..s..A...K...../
0010: 7D 9A 31 B7                                        ..1.
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:
0000: 2C DB 4A FA BD A9 1D 29   C0 0A 8F 69 7F 39 11 DA ,.J....)...i.9..
0010: 4A 21 0D 66 53 A5 03 CC   33 AB 4D E6 C1 55 75 E3 J!.fS...3.M..Uu.
0020: 8C 22 C6 F9 05 26 27 EF   BC C0 CB D8 12 3C 7C 95 .""...&amp;'......&lt;..
0030: 9B 56 88 06 71 CA 3A 17   99 6A 23 53 E9 CC 9B 05 .V..q.:..j#S....
0040: E6 85 89 25 DC CF 95 3A   41 62 5D 0C CE E9 0F D4 ...%...:Ab].....
0050: 7E 0E B6 4D CE 5A 49 F4   BB DD 9A 85 55 C1 39 0E ...M.ZI.....U.9.
0060: 0F B4 34 44 05 64 E5 F3   F0 4A 5C 40 91 2C 1E B3 ..4D.d...J\@.,..
0070: 39 D1 56 71 C2 83 48 CA   31 E5 44 60 B4 65 8D BA 9.Vq..H.1.D`.e..
0080: 70 65 7C 93 B8 84 E4 60   38 EA C7 21 7D AF 30 BD pe.....`8..!..0.
0090: 6F D5 CC 04 DA 33 E8 14   DA E8 AC BA 6A 03 5E C9 o....3......j.^.
00A0: 56 DC 78 07 FB 44 DB A8   B2 4D CE 30 CB 56 7E 6B V.x..D...M.0.V.k
00B0: F6 CE BF 3D B4 77 21 33   53 BA D8 E2 B1 B9 F4 95 ...=.w!3S.......
00C0: 05 7E FB B4 3A CF 09 29   10 B1 4E CF 38 AF 81 D6 ....:..)..N.8...
00D0: 6B DD 60 51 1C 04 27 41   71 98 07 DE B9 82 4A 1A k.`Q..'Aq.....J.
00E0: 0D F7 04 6D 09 F4 E7 1F   FE 2C 07 41 EE 84 F3 F6 ...m.....,.A....
00F0: 1A F4 62 87 3D 94 A6 5D   FD 3D 8B EE 1B A1 5B 52 ..b.=..].=....[R

]
*** ECDH ServerKeyExchange
Signature Algorithm SHA512withRSA
Server key: Sun EC public key, 256 bits
  public x coord: 65335040139868512120179408985992060136049248034231183953393366519969264579494
  public y coord: 99476183036375747385598841109418769282434814800382623908755157948061455956677
  parameters: secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)
*** ServerHelloDone
*** ECDHClientKeyExchange
ECDH Public value:  { 4, 6, 89, 131, 180, 42, 189, 111, 119, 56, 149, 20, 50, 182, 23, 83, 192, 173, 201, 60, 5, 132, 156, 221, 3, 44, 131, 63, 1, 166, 164, 34, 3, 56, 203, 122, 234, 174, 144, 123, 135, 210, 236, 219, 230, 153, 161, 126, 189, 78, 72, 8, 98, 201, 57, 28, 243, 18, 56, 113, 156, 118, 238, 160, 238 }
Thread-8, WRITE: TLSv1.2 Handshake, length = 70
SESSION KEYGEN:
PreMaster Secret:
0000: BD 2B CF E4 3E 6A 0D 32   97 16 67 3E 5A 46 CD CD .+..&gt;j.2..g&gt;ZF..
0010: CA 52 5B 89 28 43 45 35   09 89 74 1F B6 D9 02 7B .R[.(CE5..t.....
CONNECTION KEYGEN:
Client Nonce:
0000: 59 6F 88 C6 BC 82 A6 F9   AA E0 AE C7 37 58 C3 90 Yo..........7X..
0010: 2D 93 8F E1 2D DF 1E 5B   C3 2B 53 F1 C5 96 29 36 -...-..[.+S...)6
Server Nonce:
0000: 59 6F 88 58 02 8E E2 10   6B B7 2B CE DC 6B EF 71 Yo.X....k.+..k.q
0010: CC AC F1 9A 57 B9 31 5E   A3 09 BB E5 35 29 4E FE ....W.1^....5)N.
Master Secret:
0000: 44 0B B5 4E 2C 69 E1 68   85 F3 21 08 1A 75 F8 01 D..N,i.h..!..u..
0010: 33 1A 6B 3A 55 7B D3 65   F8 D6 3C BD 10 40 B2 E4 3.k:U..e..&lt;..@..
0020: A2 BC 8A 31 1F 41 9E C6   FC A4 40 F7 2F B2 59 3F ...1.A....@./.Y?
Client MAC write Secret:
0000: C0 97 F8 99 19 72 9D 18   63 FD CD 8C 64 23 BC B1 .....r..c...d#..
0010: 7B 58 D4 52 9C 71 E6 42   0A 20 ED 53 31 5F 27 A7  .X.R.q.B. .S1_'.
0020: 47 3E EA 1D AA 12 CA AA   14 1B 63 98 E0 1B AD F8 G&gt;........c.....
Server MAC write Secret:
0000: 98 BE 74 96 5D 1B 69 7D   96 0D 83 25 C3 D6 24 B0 ..t.].i....%..$.
0010: 57 15 08 62 A6 69 E3 DA   77 3D 73 A3 E6 D9 A8 7A W..b.i..w=s....z
0020: 46 E0 D2 49 ED 53 86 45   18 97 92 C3 C9 61 45 4E F..I.S.E.....aEN
Client write key:
0000: 27 67 0E 91 81 3A 6A 5B   87 78 1D E0 EB 6B C7 AE 'g...:j[.x...k..
0010: B8 78 13 9F 6F C2 8B 4E   AC 3F 01 07 BC 5C 9B 0E .x..o..N.?...\..
Server write key:
0000: 3E D2 EE 99 D4 53 84 15   C6 D6 66 5D A8 A5 40 7C &gt;....S....f]..@.
0010: 65 BB 8E A8 DF F7 B8 22   6C EF 6C 82 26 63 7D 99 e......""l.l.&amp;c..
... no IV derived for this protocol
Thread-8, WRITE: TLSv1.2 Change Cipher Spec, length = 1
*** Finished
verify_data:  { 101, 250, 185, 66, 42, 146, 49, 129, 108, 63, 34, 156 }
***
Thread-8, WRITE: TLSv1.2 Handshake, length = 96
Thread-8, READ: TLSv1.2 Change Cipher Spec, length = 1
Thread-8, READ: TLSv1.2 Handshake, length = 96
*** Finished
verify_data:  { 221, 251, 110, 51, 35, 95, 63, 112, 169, 189, 61, 120 }
***
%% Cached client session: [Session-1, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384]
ForkJoinPool.commonPool-worker-2, WRITE: TLSv1.2 Application Data, length = 96
Thread-8, handling exception: javax.net.ssl.SSLException: Unsupported record version Unknown-38.2
%% Invalidated:  [Session-1, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384]
Thread-8, SEND TLSv1.2 ALERT:  fatal, description = unexpected_message
Thread-8, WRITE: TLSv1.2 Alert, length = 80
Thread-8, called closeSocket()
Thread-8, called close()
Thread-8, called closeInternal(true)
</code></pre>

<p><strong>Spring LDAP Client Configuration</strong></p>

<pre><code>&lt;?xml version=""1.0"" encoding=""UTF-8""?&gt;
&lt;beans xmlns=""http://www.springframework.org/schema/beans""
       xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
       xmlns:context=""http://www.springframework.org/schema/context""
       xmlns:ldap=""http://www.springframework.org/schema/ldap""
       xsi:schemaLocation=""http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/ldap http://www.springframework.org/schema/ldap/spring-ldap.xsd""&gt;

    &lt;context:property-placeholder location=""classpath:application.properties""/&gt;
    &lt;bean id=""ldapAuthenticationStrategy"" class=""org.springframework.ldap.core.support.DefaultTlsDirContextAuthenticationStrategy""&gt;
        &lt;property name=""shutdownTlsGracefully"" value=""true""/&gt;
    &lt;/bean&gt;
    &lt;ldap:context-source url=""${ldap.primary.url}, ${ldap.secondary.url}""
                         username=""${ldap.userDn}""
                         password=""${ldap.password}""
                         base=""${ldap.base}""
                         referral=""follow""
                         native-pooling=""false""
                         authentication-strategy-ref=""ldapAuthenticationStrategy""&gt;
    &lt;/ldap:context-source&gt;
    &lt;ldap:ldap-template id=""ldapTemplate"" context-source-ref=""contextSource"" time-limit=""5000""/&gt;
&lt;/beans&gt;
</code></pre>

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

<pre><code>public class TangoLdapClient {
    static final String UID = ""uid"";

    private final LdapTemplate ldapTemplate;

    /**
     * Constructor.
     * @param ldapTemplate {@link LdapTemplate}.
     */
    public TangoLdapClient(@NonNull final LdapTemplate ldapTemplate) {
        this.ldapTemplate = ldapTemplate;
    }

    /**
     * Authenticate with username and password.
     * @param username username.
     * @param password password.
     * @throws EmptyResultDataAccessException in the case that the username is not found, and therefore cannot be mapped to dn.
     * @throws AuthenticationException in the case where the password doesn't match.
     */
    public void authenticate(@NonNull final String username, @NonNull final String password)
            throws EmptyResultDataAccessException, AuthenticationException {
        Preconditions.checkArgument(StringUtils.isNotBlank(username));
        ldapTemplate.authenticate(buildFindUserFromUserName(username), password,
            (ctx, ldapEntryIdentification) -&gt; wrappedMapper(ctx, ldapEntryIdentification));
    }

    private LdapQuery buildFindUserFromUserName(final String username) {
        return query().where(UID).is(username);
    }

    private static DirContextOperations wrappedMapper(final DirContext ctx,
                                                      final LdapEntryIdentification ldapEntryIdentification) {
        try {
            return (DirContextOperations) ctx.lookup(ldapEntryIdentification.getRelativeName());
        } catch (NamingException e) {
            throw new RuntimeException(""Failed to lookup "" + ldapEntryIdentification.getRelativeName(), e);
        }
    }
}
</code></pre>
",https://stackoverflow.com/questions/45232244/cannot-establish-tls-connection-between-spring-ldap-client-and-apacheds,"['tls1.2', 'spring-ldap', 'apacheds']",1097,FALSE,1,0
Firebase-server for Automated UI Tests in iOS?,"<p>Has anyone had success using Urish' firebase-server for isolated UI Tests in XCode?</p>

<p>Resource for the Firebase-server component, which seems great btw (github link inside article)!</p>

<ul>
<li><a href=""https://www-staging.firebase.com/blog/2015-04-24-end-to-end-testing-firebase-server.html"" rel=""nofollow noreferrer"">https://www-staging.firebase.com/blog/2015-04-24-end-to-end-testing-firebase-server.html</a></li>
</ul>

<h1>What I'm after</h1>

<p>I want to be able to test scenarios like the below. </p>

<ul>
<li>I'm building an app that has some fairly advanced UI logic (for instance drag and drop) and I want a way to setup test data in firebase that I can run tests against and reset data to a previous stage. </li>
<li>I'm also after testing logged in vs logged out use cases deterministically as the logged in use case sets up core data, etc. that I want to check is done correctly and doesn't overwrite data if logging out/in again, etc.</li>
<li>I store data locally in core data that I sync w firebase via merging, etc. I want to test scenarios such as: A user updated firebase (via another device or web) whilst their primary device was offline and how the primary device will sync and update its core data objects when app starts, etc.</li>
</ul>

<p>My general approach is that in my unit tests I can mock out firebase connections, etc. but with my UI Tests I want to test more 'end to end' scenarios - preferably only mocking out network/etc.</p>

<h1>What' I've done</h1>

<p>I spotted Urish' firebase server [<a href=""https://firebase.googleblog.com/2015/04/end-to-end-testing-with-firebase-server_16.html:here]"" rel=""nofollow noreferrer"">https://firebase.googleblog.com/2015/04/end-to-end-testing-with-firebase-server_16.html:here]</a> so I installed it via node npm</p>

<ol>
<li>ensured I had <code>homebrew</code> installed</li>
<li>installed <code>node</code> via homebrew</li>
<li>added entries to my hosts file for tests (I used <code>127.0.0.1 localhost</code>)</li>
<li>I updated the <code>DATABASE_URL</code> in <code>GoogleService-Info.plist</code> to <code>ws://localhost:5000</code></li>
<li>I had test data stored in firebase so I exported this to <code>TestData/4Projects3Levels.json</code></li>
<li>Started firebase server in new terminal (my env is MAC) <code>node_modules/.bin/firebase-server -f TestData/4Projects3Levels.json</code></li>
</ol>

<p>Now I run the app I get the below error. Seems the app can't connect to the database in Firebase. What could I do wrong? </p>

<pre><code>*** Terminating app due to uncaught exception 'No Firebase database specified.', reason: 'No Firebase database found for input: '
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010a654b0b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x0000000109ca4141 objc_exception_throw + 48
    2   CoreFoundation                      0x000000010a6bd625 +[NSException raise:format:] + 197
    3   Nasta iOS                           0x0000000108202a82 +[FUtilities parseUrl:] + 791
    4   Nasta iOS                           0x000000010822e896 +[FIRDatabase databaseForApp:] + 342
    5   Nasta iOS                           0x000000010822e720 +[FIRDatabase database] + 102
    6   Nasta iOS                           0x000000010813e31d _TFIZvV9Nasta_iOS14InjectorMapper23firebaseDBRootReferenceFT_CSo20FIRDatabaseReferenceiU_FT_S1_ + 61
    7   Nasta iOS                           0x000000010812006a _TFE9Nasta_iOSPS_31FirebaseRootDBReferenceInjectedg23firebaseDBRootReferenceCSo20FIRDatabaseReference + 58
    8   Nasta iOS                           0x0000000108120117 _TFC9Nasta_iOS13FirebaseStorecfT_S0_ + 103
</code></pre>
",https://stackoverflow.com/questions/43299463/firebase-server-for-automated-ui-tests-in-ios,"['ios', 'swift', 'xcode', 'firebase', 'xcode-ui-testing']",367,FALSE,1,0
How to wait for URL to load after button click in protractor?,"<p>I'm doing an end-to-end testing using protractor on an angular 2 project and i'm required to test a login operation. The problem here is that when login button is clicked the expect statement still gets the login page's URL as supposed to home page. If I wait, then the test succeeds. I have read somewhere in the documentation that protractor waits for processes to complete automatically, so, </p>

<ol>
<li>What is causing this error? </li>
<li>How can I perform the operation correctly without explicitly using <code>wait()</code> method?</li>
<li>Does protractor have something similar to <code>fakeAsync</code>, <code>async</code> or atleast <code>whenStable</code> like in unit
test?</li>
</ol>

<p>Here's my test case</p>

<pre><code>it(""User successfully login"",()=&gt;{
    browser.get(browser.baseUrl + '/account/login').then(() =&gt; {
        return expect(browser.getCurrentUrl()).toBe(browser.baseUrl +  ""/account/login"")
    }).then(()=&gt;{
        element(by.tagName('input[type=text]')).sendKeys('username');
        element(by.tagName('input[type=password]')).sendKeys('password');
        element(by.css('button[type=submit]')).click().then(()=&gt;{
            return expect(browser.getCurrentUrl()).toBe(browser.baseUrl + ""/home"");
        });

    });
});
</code></pre>

<p><strong>Note:</strong> </p>

<ol>
<li>I have instructions to avoid using <code>browser.wait()</code> method. </li>
<li>Login button sends an http request to the backend via API.</li>
</ol>

<h3>Workaround solution [Based on Ernst's solution]:</h3>

<p>I sort of solved this problem. I don't know if it works for other scenarios or if it's the correct approach. I added </p>

<pre><code>browser.wait(EC.urlContains(browser.baseUrl + ""/account/login""), 10000);
browser.waitForAngularEnabled(false);
browser.wait(EC.urlContains(browser.baseUrl + ""/home"");
</code></pre>

<p>just after click() event and it seems to work for now.</p>
",https://stackoverflow.com/questions/47195796/how-to-wait-for-url-to-load-after-button-click-in-protractor,"['angular', 'typescript', 'protractor', 'end-to-end']",4688,TRUE,4,1
How do you do Angular Component Testing with an externally hosted Login?,"<p>I have no code to show because currently I dont know where to start.</p>

<p>anyone that has done end-to-end testing on an angular app should be familiar with the ng e2e command which spins up a browser and attempts to run tests on the components.</p>

<p>The problem is the app I am testing requires you to login via an Auth0 hosted login screen which then redirects you to the app and a token then gets set in local storage which is checked with each request from then on, if its valid the app's routing takes you to the home page.</p>

<p>My problem is that running ng e2e spins up the app, the standard functionality runs and redirects to the auth0 hosted login screen, protractor then sees that the page its looking at isnt an angular app and the tests / browser close.</p>

<p>Does anyone have any pointers on either setting a fake access token for the purposes of testing or any other way?</p>
",https://stackoverflow.com/questions/48020392/how-do-you-do-angular-component-testing-with-an-externally-hosted-login,"['angular', 'unit-testing', 'auth0', 'e2e-testing']",360,TRUE,2,2
WebdriverIO/Cucumber/Allure reporting issues,"<p>I've followed all of the steps for getting a system setup using webdriverio and cucumber for some end to end testing and the next thing I wanted to take care of was reporting. Found allure reporting too which is great and works pretty much out if the box. I have two things I need fixed however,</p>

<ol>
<li>I can see that allure is reporting each of the steps ran however, it appears that the steps are order alphabetically (which is not very useful in debugging and trying to reproduce). Is there a way to add sorting by timestamp to steps within a suite?</li>
</ol>

<p>and </p>

<ol start=""2"">
<li>For the custom reporter, I can do <code>this.on('suite:start', (suite) =&gt; {</code> etc. but I would like to know what is the correct term to plug into each step. I know there's a <code>beforeStep:</code> method that we can use in the <code>wdio.conf</code> but i would like the reporter to determine where to do the logging. What is the correct way to do that?</li>
</ol>
",https://stackoverflow.com/questions/45597098/webdriverio-cucumber-allure-reporting-issues,"['webdriver-io', 'cucumberjs', 'allure']",391,FALSE,1,1
Angular2 - Executing e2e tests in different environments,"<p>I am new to <code>Protractor</code>. I have developed few tests cases to accomplish the end to end testing. These test cases works fine in all 3 different environments that we have : <code>dev</code>, <code>testing</code> and <code>production</code>.  </p>

<p>But I need to change Angular application URL in test cases with respect the environment in which testing needs to be done (as the URL differs from environment to environment).</p>

<p>I am using Angular CLI command <code>ng e2e</code> to run the test. Now my questions are </p>

<p>1) Is it possible to pass params <code>ng e2e</code>, so that based on params, URL can be set dynamically inside test cases ?</p>

<p>2) Is it necessary to install <code>protractor</code> globally, Since Angular CLI creates the angular application with <code>protractor</code> under <code>node_modules</code>?</p>

<p>In my project set up, <code>Protractor</code> version is 5.1.2 and <code>Angular CLI</code> version is 1.2.0.</p>

<p>Below is <code>Protract</code> configuration</p>

<pre><code>exports.config = {
  allScriptsTimeout: 11000,
  specs: [
     './e2e/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome'
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
  },
  useAllAngular2AppRoots: true,
  beforeLaunch: function() {
    require('ts-node').register({
        project: 'e2e'
    });
  },
  onPrepare: function() {
    jasmine.getEnv().addReporter(new SpecReporter());
  }
};
</code></pre>

<p>I tried couple of things like adding <code>params:[env:dev]</code> and passed the parameter in command line as <code>ng e2e params.env=test</code>, But I always get the default values and not the values passed from command line.</p>

<p>I also tried @cnishina answer, but console.log of <code>process.env</code> does not have needed details.</p>
",https://stackoverflow.com/questions/45997951/angular2-executing-e2e-tests-in-different-environments,"['angular', 'protractor', 'angular2-testing', 'angular2-cli']",4567,TRUE,8,3
What docker image use for ionic CD / e2e testing? Ubuntu or just node?,"<p>I want to enable continuous delivery for one ionic project. 
I am going to use <a href=""https://bitbucket.org/product/features/pipelines"" rel=""nofollow noreferrer"">Bitbucket pipelines</a> which use Docker images.</p>

<p>I confused which Docker image I should use for the container.</p>

<p>Is it enough a node image or do I need a ubuntu image?
I might have to create my own image but what should be the base of that image.</p>

<p>Before running the end to end testing I will have to run few commands. e.g:</p>

<ul>
<li>pull from git master branch</li>
<li>npm install</li>
<li>npm install -g cordova ionic</li>
<li>bower install</li>
<li>run a gulp task</li>
<li>run protractor test</li>
</ul>

<p>The ionic project is also publish as a <em>webapp</em>, I deploy it to production from an Ubuntu 16.04 server (but served with ngnix) which make me think it is a good idea to have same environment in <em>dev</em> and <em>prod</em>.</p>

<p>With all of this, what should it be my Docker base image?</p>

<ul>
<li><a href=""https://hub.docker.com/_/node/"" rel=""nofollow noreferrer"">node:boron</a></li>
<li><a href=""https://hub.docker.com/_/ubuntu/"" rel=""nofollow noreferrer"">ubuntu:16.04</a></li>
</ul>

<p>In case both are valid options wouldn't be node image faster to build than ubuntu?</p>
",https://stackoverflow.com/questions/42956740/what-docker-image-use-for-ionic-cd-e2e-testing-ubuntu-or-just-node,"['docker', 'ionic-framework', 'e2e-testing', 'continuous-delivery', 'bitbucket-pipelines']",93,FALSE,1,0
How to close print windows dialog in Protractor Test,"<p>I am doing end-to-end testing with protractor. In a certain test, I need to test like print button is creating pdf or not. So When Test clicks the button, It opens the print window dialog like below.</p>

<p><a href=""https://i.stack.imgur.com/aA4sL.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/aA4sL.png"" alt=""enter image description here""></a></p>

<p>And now this test is not able to be finished. because of this print window. My question is how to close this print dialog in protractor? Because of it, rest of test become pending. Please help. Thanks in advance.</p>

<h1>EDIT</h1>

<p>I have tried like this..</p>

<pre><code>var printButton=element(by.css('[class=""print""]'));
        /* This print button should be present first*/
        expect(printButton.isPresent()).toBe(true);

        browser.actions().mouseMove(printButton).perform();
        printButton.click().then(function () {
             // fill in the form here
             browser.sleep(2000);
            // For Pressing Escape key
            browser.actions().sendKeys(protractor.Key.ESC).perform();

        });
</code></pre>

<p>I thought If i got successful to press escape key, then It will resolve the issue.But No Success.</p>

<p>NEXT EDIT--
I have tried new Windows change like below</p>

<pre><code>printButton.click().then(function () {
             // fill in the form here

            browser.sleep(4000);
            browser.getAllWindowHandles().then(function(handles){
                browser.switchTo().window(handles[1]).then(function(){
                    //do your stuff on the pop up window

                    browser.driver.close();
                    browser.switchTo().window(handles[0]);
                });
            });

        });
</code></pre>

<p>but it shows an error in console and actually It does not open any windows. and hungs up on print dialog as previous.</p>

<pre><code> Failed: unknown error: failed to close window in 20 seconds
</code></pre>

<h1>EDIT 3</h1>

<p>I am having this problem in angular js not in java. </p>

<h1>EDIT 4 My Last Attempt</h1>

<pre><code>printButton.click().then(function () {
             // fill in the form here
            return browser.getAllWindowHandles().then(function (handles) {
                var newWindowHandle = handles[1]; // this is your new window
                return browser.switchTo().window(newWindowHandle).then(function () {
                    return browser.sleep(5000).then(function () {
                        return browser.actions().sendKeys(protractor.Key.ESCAPE).perform().then(function () {
                            return browser.switchTo().window(handles[0])
                        });
                    });
                });
            });
</code></pre>

<p>But It does not open a new tab for print Dialog..open print Dialog in same tab.</p>
",https://stackoverflow.com/questions/45939646/how-to-close-print-windows-dialog-in-protractor-test,"['javascript', 'jquery', 'angular', 'protractor']",1918,FALSE,1,2
"End-to-End test with Protractor, Appium, Ionic on iOS device. Timeout on accesing HTML element","<p>Note: I'm just starting to work with end-to-end testing so please forgive my noobness. </p>

<h2>The problem</h2>

<p>I am trying to execute end-to-end test using Protractor with Jasmine and Appium on a iOS device on a simple dummy application created with Ionic v1. All what I am trying to make the test do is just click a button located with: <code>element(by.css('a[icon-on=ion-ios-chatboxes]'))</code>. </p>

<p>What I am getting is a timeout but I wasn't able to track down the problem to the root.</p>

<blockquote>
  <p>Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.</p>
</blockquote>

<p>The interesting part is that on an Android device works without any problem. </p>

<h2>Environment</h2>

<ul>
<li>Appium version: v1.6.5</li>
<li>Last Appium version that did not exhibit the issue: -</li>
<li>Desktop OS/version used to run Appium: macOS Sierra 10.12.3</li>
<li>Node.js version (unless using Appium.app|exe): v7.8.0</li>
<li>Mobile platform/version under test: iOS 10.3.1</li>
<li>Real device or emulator/simulator: Real Device</li>
<li>Appium CLI or Appium.app|exe: Appium CLI</li>
</ul>

<h2>Link to Appium, Protractor and webDriver logs</h2>

<p><a href=""https://gist.github.com/SpedsT/e16e4ee6093fde873c18467e96392296"" rel=""nofollow noreferrer"">https://gist.github.com/SpedsT/e16e4ee6093fde873c18467e96392296</a></p>
",https://stackoverflow.com/questions/45064148/end-to-end-test-with-protractor-appium-ionic-on-ios-device-timeout-on-accesin,"['ionic-framework', 'jasmine', 'timeout', 'protractor', 'appium']",415,FALSE,0,1
ScalaTest+Play compatibility with ScalaTest 3.0.1 and Play 2.5.12,"<p>I'm using Play 2.5.12, and in other parts of our project, we're using ScalaTest 3.0.1.</p>

<p><a href=""https://www.playframework.com/documentation/2.5.x/ScalaTestingWithScalaTest"" rel=""nofollow noreferrer"">According to the Play documentation</a>, there is a glue library ScalaTest+Play to enable end-to-end testing of Play apps with ScalaTest:</p>

<blockquote>
  <p>You do not need to add ScalaTest to your build explicitly. The proper version of ScalaTest will be brought in automatically as a transitive dependency of ScalaTest + Play. You will, however, need to select a version of ScalaTest + Play that matches your Play version. You can do so by checking the Versions, Versions, Versions page for ScalaTest + Play.</p>
</blockquote>

<p>That <a href=""http://www.scalatest.org/plus/play/versions"" rel=""nofollow noreferrer"">Versions, Versions, Versions</a> page lists ScalaTest+Play versions up to 1.4.0, supporting ScalaTest 2.2.x and Play 2.4.x. The Play documentation however suggests that a newer ScalaTest+Play 1.5.0 version works with Play 2.5.x. It certainly exists, but I can't tell which version of ScalaTest it's using; it would seem not one that supports ScalaTest features we use in other parts of our codebase.</p>

<ul>
<li>Is there a more up to date version of the Versions, Versions, Versions page?</li>
<li>Is there a version of ScalaTest+Play that works with Play 2.5.x and ScalaTest 3.0.x?</li>
</ul>
",https://stackoverflow.com/questions/44140123/scalatestplay-compatibility-with-scalatest-3-0-1-and-play-2-5-12,"['scala', 'playframework', 'scalatest']",94,FALSE,0,1
Run action after a build label is set,"<p>I have a standard build configuration, ending with a simple ssh copy of the output files to a remote server.</p>

<p>The process wanted is simple:</p>

<ul>
<li>The developper pushes the commit to production</li>
<li>Teamcity builds the product</li>
<li>The developper downloads the product from the remote server where build results are stored</li>
<li>The developper tests the product (end-to-end testing, testing setups etc, can't be automated at the moment).</li>
<li>If the product is okay, label the build that produced this output as the new version (let's say 3.2.1).</li>
<li>Teamcity applies the label, and moves the files produced by this build to a folder named after the label value (3.2.1 in this example).</li>
</ul>

<p>Only the last step is missing, because I don't find any ways to connect on the tag action to trigger some sort of build action.</p>

<p>I already tried to link another build configuration to this one, but the issue is that it has to be triggered by the developper for a specific build ID, so the developper tests the output of a given build, if it's okay, he tells teamcity ""Okay, release this build as version 3.2.1"" and the build artifacts are persisted in a folder named 3_2_1 for instance.</p>
",https://stackoverflow.com/questions/47870245/run-action-after-a-build-label-is-set,['teamcity'],25,FALSE,1,0
Should I make Protractor E2E Test completely synchronous,"<p><strong>Brief:</strong> Trying to make E2E test in Angular 2 synchronous</p>

<p>Protractor is a wrapper around Jasmine that adds some support for promises in E2E tests, so devs didn't have to create a lot of nested async callbacks, async hell. I presume that Protractor encourages devs to make their tests synchronous. </p>

<p>Quotation from here: <a href=""https://blog.liip.ch/archive/2015/01/28/angularjs-end-to-end-testing-with-protractor.html"" rel=""nofollow noreferrer"">https://blog.liip.ch/archive/2015/01/28/angularjs-end-to-end-testing-with-protractor.html</a></p>

<blockquote>
  <p>It is important to note that Protractor is entirely asynchronous, so
  all API methods return promises. Under the hood, Protractor uses
  Selenium’s control flow (a queue of pending promises) to allow us to
  write tests in a pseudo-synchronous way. Protractor is smart enough to
  make it all work.</p>
</blockquote>

<p>This is how people get confused about this.</p>

<ul>
<li><a href=""https://stackoverflow.com/questions/27799454/dealing-synchronously-in-protractor-tests"">Dealing synchronously in Protractor tests</a></li>
<li><a href=""https://github.com/angular/protractor/issues/673#issuecomment-125599377"" rel=""nofollow noreferrer"">https://github.com/angular/protractor/issues/673#issuecomment-125599377</a></li>
</ul>

<p>So, there are still some cases when devs should deal with async methods in their tests, e.g. I need to get <strong>href</strong> attribute of the link and check if it has an ID at the end of it, so I must define callback to get attribute's value, parse it and only after this check if it has an ID or not.</p>

<pre><code>$('a').getAttribute(""href"").then((url) =&gt; {
    expect(url.substring(url.lastIndexOf('/'), url.length)).not.toBeNaN();
});
</code></pre>

<p>As a result, my test is not synchronous and straightforward anymore.</p>

<p><strong>Question:</strong> Should I move this method from the test to Page Object and try to make it synchronous?</p>

<pre><code>// Page Object

getImageId() {

    let attribute = null;
    let link = element(by.css('app-image-container .edit-image a'));

    link.getAttribute('href').then((data) =&gt; { attribute = data; });
    browser.wait(() =&gt; { return attribute != null; });

    return attribute;
}

// Test is synchronous now

expect(page.getImageId()).not.toBeNaN();
</code></pre>
",https://stackoverflow.com/questions/46205242/should-i-make-protractor-e2e-test-completely-synchronous,"['angular', 'protractor', 'e2e-testing']",411,FALSE,1,0
Sending test emails with Google AppEngine dev server,"<p>I'm developing an application which will send out notification emails and I'd like to perform end-to-end testing on the email before I deploy the capability.</p>

<p>To this end, I've got a dummy SMTP service running on my development machine that accepts any incoming mail and just stores it in a single box that a POP client can access, no matter who the sender and receiver are.</p>

<p>I've used this with other applications to make sure that emails get sent, that they're readable by various clients, and so on. I see that, by default, there is a com.google.appengine.api.mail.MailService that my application code can call into to send messages and, in the real environment, it actually sends email.</p>

<p>However, in the dev environment, the mail seems to get dropped on the floor.</p>

<p>I see log messages from worker threads like this:</p>

<pre><code>Sep 13, 2017 9:05:38 PM com.google.appengine.api.mail.dev.LocalMailService log
INFO: MailService.send
Sep 13, 2017 9:05:38 PM com.google.appengine.api.mail.dev.LocalMailService log
INFO:   From: myapp &lt;myapp-sender@myapp.appspotmail.com&gt;
Sep 13, 2017 9:05:38 PM com.google.appengine.api.mail.dev.LocalMailService log
INFO:   To: Recipient &lt;user@test.com&gt;
Sep 13, 2017 9:05:38 PM com.google.appengine.api.mail.dev.LocalMailService log
INFO:   Reply-to: myapp &lt;myapp-sender@myapp.appspotmail.com&gt;
Sep 13, 2017 9:05:38 PM com.google.appengine.api.mail.dev.LocalMailService log
INFO:   Subject: Email Update
Sep 13, 2017 9:05:38 PM com.google.appengine.api.mail.dev.LocalMailService log
INFO:   Body:
Sep 13, 2017 9:05:38 PM com.google.appengine.api.mail.dev.LocalMailService log
INFO:     Content-type: text/plain
Sep 13, 2017 9:05:38 PM com.google.appengine.api.mail.dev.LocalMailService log
INFO:     Data length: 948
</code></pre>

<p>But there doesn't seem to be an obvious way for me to see the actual message. I did find an example in the Google documentation that led me to write this bit of code:</p>

<pre><code>    Properties mailProps = new Properties();
    AbstractConfiguration config = ConfigurationManager.getConfig();
    String smtpHost = config.getString(""email.smtp.host"");
    __l.debug(""Sending email via SMTP connection to host ""+smtpHost);
    mailProps.setProperty(""mail.smtp.host"", smtpHost);
    mailProps.setProperty(""mail.smtp.port"", config.getString(""email.smtp.port"", ""25""));
    mailProps.setProperty(""mail.smtp.connectiontimeout"", config.getString(""email.smtp.connectiontimeout"", ""1000""));
    mailProps.setProperty(""mail.smtp.timeout"", config.getString(""email.smtp.timeout"", ""1000""));
    Session session = Session.getDefaultInstance(mailProps, null);
    try {
        Message msg = new MimeMessage(session);
        msg.setFrom(new InternetAddress(config.getString(""email.sender.address""), config.getString(""email.sender.name"")));
        msg.addRecipient(Message.RecipientType.TO,
                         new InternetAddress(toAddress, toName));
        msg.setSubject(title);
        msg.setText(messageText);
        Transport.send(msg);
        __l.info(""message has been sent to "" + toAddress);
    } catch (Exception e) {
        __l.warn(""Exception attempting to send email to ""+toAddress+"" about ""+title, e);
    }
</code></pre>

<p>However, when I run this in my dev server, it looks like I'm <em>still</em> using the built in MailService, and my local dummy SMTP service never actually gets contacted.</p>

<p>Is there any way to achieve my goal of being able to view the app-generated email in an email client, or do I just get to debug every new email template in ""the big lab""?</p>
",https://stackoverflow.com/questions/46210440/sending-test-emails-with-google-appengine-dev-server,"['java', 'google-app-engine', 'smtp']",431,TRUE,2,1
NotifyBuilder behaves inconsistently on repetitive runs,"<p>I want to make end-to-end testing of my application and I need to make sure Camel routes work fine. I use NotifyBuilder to make sure message is completed, and since consuming message takes some time I want to let it 30 seconds to be processed (but if message completed sooner it should not wait) and then proceed with verification. This works fine, but... but unfortunately from time to time NotifyBuilder doesn't react on message completion, but my log messages are stating that all required steps are done. This happens not always, but regularly, 2 times from ten runs in average. What is interesting, I use such approach in several tests, and they fail with this issue randomly, usually one at a time (all the others pass).</p>

<p>After debugging Camel code a bit, I noticed that methods <code>org.apache.camel.builder.NotifyBuilder.EventPredicateSupport#onExchangeCompleted</code> and <code>org.apache.camel.builder.NotifyBuilder.EventPredicateSupport#onExchange</code> are not invoked for some reasons, even when corresponding event has been fired.</p>

<p>Also I noticed that when running tests in isolation (one at a time), everything works as expected. Also when I send one and the same message twice NotifyBuilder calls <code>org.apache.camel.builder.NotifyBuilder.EventPredicateSupport#onExchangeCompleted</code> only for the second message.</p>

<p>I use camel 2.18.3 and JDK 8u60. OS Linux Mint 17 and CentOS (on Windows seems like everything works fine). Tests are executed in a single thread by gradle task in command line. </p>

<p>Does anyone have an idea what can be the reason for such a behavior?</p>

<p>Thanks in advance.</p>

<p>Here is my test class code and camel configuration:</p>

<pre><code>public class EndToEndTest {

    @Resource(name = ""camelContext"")
    private CamelContext camelContext;
    @Produce(uri = ""activemq:fromQueueName"")
    private ProducerTemplate template;

    @Test
    public void testWithNotifyBuilder() {
        NotifyBuilder notify = new NotifyBuilder(camelContext)
            .whenCompleted(1)
            .from(""activemq:fromQueueName"")
            .create();
        template.sendBody(""{\""json\"":\""example\""}"");
        assertTrue(notify.matches(30, TimeUnit.SECONDS));
        // other verifications
    }}

&lt;camelContext id=""camelContext"" xmlns=""http://camel.apache.org/schema/spring""&gt;
&lt;!-- other endpoints and beans --&gt;
&lt;endpoint id=""fromEndpoint"" uri=""activemq:fromQueueName""/&gt;
&lt;route&gt;
    &lt;from ref=""fromEndpoint""/&gt;
    &lt;unmarshal&gt;
        &lt;custom ref=""customMessageUnmarshaller""/&gt;
    &lt;/unmarshal&gt;
    &lt;bean ref=""customMessageConsumer""/&gt;

    &lt;onException redeliveryPolicyRef=""defaultRedeliveryPolicy""&gt;
        &lt;exception&gt;java.net.SocketException&lt;/exception&gt;
        &lt;exception&gt;javax.jms.JMSException&lt;/exception&gt;
        &lt;handled&gt;
            &lt;constant&gt;true&lt;/constant&gt;
        &lt;/handled&gt;
    &lt;/onException&gt;
&lt;/route&gt;
&lt;!-- other routes --&gt;
</code></pre>

<p></p>
",https://stackoverflow.com/questions/45480313/notifybuilder-behaves-inconsistently-on-repetitive-runs,"['java', 'apache-camel', 'activemq']",487,TRUE,1,1
Nightwatch.js with chromedriver not showing window switch,"<p>As we all know, you can never know too many end to end testing frameworks, and to that end I've written a basic implementation using Nightwatch.js.  Things work mostly well, however I""m noticing an issue with the ""switchWindow()"" function.  Basically, I launch the framework, open one window, then open a second.  I've written a function</p>

<pre><code>function switchWindow(win) {
  client.windowHandles(function(result) {
    var newWindow = result.value[win]
    this.switchWindow(result.value[win]);
  });
}
</code></pre>

<p>which takes an input telling it which window to switch to and it should then change the window.  Control definitely is moving between the two windows.  For example, if I'm on the second window, then I call the function to switch to the first, take some action and check that the action has been successful, it makes the change on the first window and the test based on that comes back green.  However, I never actually see the browser move to the first window, it always stays on the last window open (the second one.)</p>

<p>The problem with this is that changes in one window change the browsers local storage, and other windows have an event listener which waits for that change and update their own page content based on those storage changes.  However, if the control is on the first window, the updates aren't properly carrying over onto the second without the windows switching back and forth.  If I pause execution (using the .pause() method) and manually click between the windows the updates take place.  If I don't the update's don't properly carry over, then when I check to see if the alternate page has updated in sync with the first the tests fail.  I can work around this but the result is an ugly test flow that is rather brittle.</p>

<p>So this gets back to my main question, namely why isn't Chrome actually switching between browsers instead of just bouncing control back and forth?  And is there any way to make it do so?</p>
",https://stackoverflow.com/questions/42754461/nightwatch-js-with-chromedriver-not-showing-window-switch,"['javascript', 'google-chrome', 'nightwatch.js']",444,FALSE,1,0
Setting a BBSectionInfo using BBSettingsGateway fails for unclear reason,"<p>I’m attempting to create a solution for an end-to-end testing suite to set user permissions (contacts, photos, notifications, etc.) <strong>on the simulator</strong>. The reason for doing this is because permission alerts are displayed by SpringBoard, and they interfere with the testing suite.</p>

<p>I’ve tried using the XCUITest suite, but it does not work as expected regarding SpringBoard alerts, and is inconvenient to use in general.</p>

<p>So my idea was to modify system files in order to set permissions on-demand. I found the TCC database, and it seems to be pretty straightforward. I then noticed that notification permissions are saved under a different file, <code>/Library/BulletinBoard/SectionInfo.plist</code>. This file is cached by a <code>BBServer</code> object in the SpringBoard process. I managed to change this file, and if SpringBoard is terminated, changes to the file are accepted. But I want this change to happen during the tested app’s process runtime.</p>

<p>After some digging, I noticed that when the Settings app (Preferences) makes a change to notification settings, it uses an XPC connection to notify it has made a change.</p>

<p>I am trying to accomplish the same thing in the tested process. I create a <code>BBSectionInfo</code> object which contains all the settings for the notifications, and try to notify the BulletinBoard server of this change using a <code>BBSettingsGateway</code>, which internally uses an XPC connection. This does not work, and I am not sure why not, because I do not get any error.</p>

<p>Perhaps it’s an entitlement issue? What annoys me is that no error is given by the system, just <em>nothing</em> happens.</p>

<p>In debugger, bringing the XPC connection, I get this:</p>

<pre><code> (lldb) po [inv.target valueForKey:@“connection”]
 &lt;NSXPCConnection: 0x60000011bcf0&gt; connection to service named com.apple.bulletinboard.settingsconnection
</code></pre>

<p>The internal connection also does not disclose any issues:</p>

<pre><code> (lldb) po [[inv.target valueForKey:@""connection""] valueForKey:@""xpcConnection""]
 &lt;OS_xpc_connection: connection[0x6000001a6200]: { refcnt = 2, xrefcnt = 1, name = com.apple.bulletinboard.settingsconnection, type =  named, state = init-done, error = 0x0 mach = true, privileged = false, bssend = 0x6f07, recv = 0x6d0b, send = 0x7003, pid = 0, euid = 4294967295, egid = 4294967295, asid = 4294967295 } &lt;connection: 0x6000001a6200&gt; { name = com.apple.bulletinboard.settingsconnection, listener = false, pid = 0, euid = 4294967295, egid = 4294967295, asid = 4294967295 }&gt;
</code></pre>

<p>So all seems good. The only difference I can find between the connections is that in my process, the state is <code>init-done</code>, while in the Preferences process, the state is <code>checked in</code>:</p>

<pre><code>(lldb) po [[[QuietHoursStateController sharedController] bbGateway] valueForKey:@""connection""]
&lt;NSXPCConnection: 0x6180001160b0&gt; connection to service named com.apple.bulletinboard.settingsconnection

(lldb) po [[[[QuietHoursStateController sharedController] bbGateway] valueForKey:@""connection""] valueForKey:@""xpcConnection""]
&lt;OS_xpc_connection: connection[0x6180001a3fe0]: { refcnt = 2, xrefcnt = 1, name = com.apple.bulletinboard.settingsconnection, type = named, state = checked in, error = 0x0 mach = true, privileged = false, bssend = 0x9d03, recv = 0x9817, send = 0x9e03, pid = 17877, euid = 26053515, egid = 20, asid = 100046 } &lt;connection: 0x6180001a3fe0&gt; { name = com.apple.bulletinboard.settingsconnection, listener = false, pid = 17877, euid = 26053515, egid = 20, asid = 100046 }&gt;
</code></pre>

<p>I don’t have enough experience with XPC connections, so maybe I am missing something? <code>BBSettingsGateway</code> seems to manage its own connection, and it does not expose any methods for managing the connection.</p>

<p>I don’t mind other creative solutions, as this solution is only for the simulator. I have added the <code>jailbreak</code> tag for discoverability, but I am looking for simulator-only solutions.</p>
",https://stackoverflow.com/questions/43067710/setting-a-bbsectioninfo-using-bbsettingsgateway-fails-for-unclear-reason,"['ios', 'jailbreak', 'iphone-privateapi', 'springboard', 'xpc']",214,TRUE,7,1
How to manage continuous delivery with micro services?,"<p>Right now we are working with Jenkins as our CI and CD, we are also using an Agile methodology (sprint). I was wondering how can I manage the releases of my software.</p>

<p>For example we are developing a shopping site for a business. The development consists of an application which consumes 3 micro services.</p>

<p>Components:
<br>
<br>
Application: Is the user interface
<br>
Micro service 1: Sales
<br>
Micro service 2: Users
<br>
Micro service 3: Products 
<br></p>

<p>Initial state of the shopping site:
<br></p>

<p>We start developing the shopping site from scratch. As I said before we are working with an Agile Methodology (Sprints).</p>

<p>Sprint 1:
<br>
  - Develop products micro service.
<br>
  - Develop users micro service.
<br>
End of Sprint 1</p>

<p>By this time I can only apply micro service testing, like unit testing, contract testing, etc. Because I don't have the application ready I can't make end to end testing or functional testing based on the entire system, as well I can't deploy to UAT environment (show a beta version to the users) because the user wont be able to do exploratory testing. So for now I need to wait until the application and sales micro service is finished, so I can show the beta version to the user and apply any other type of testing.</p>

<p>Sprint 2:
<br>
   - Develop sales micro service.
<br>
   - Develop application.
<br>
End of Sprint 2</p>

<p>Now that all the components needed are finished to accomplish the user requirements, we can continue with the pipeline. applying  all the testing needed before we show a beta version to the user.</p>

<p>So the million dollar question is, how would you do this scenario with Jenkins and GitLab?</p>

<p>I understand that micro services should be independent to every component in the system, but at the end the entire system depends on each other, for example if I add a new micro service like ""shipping"", this new functionality should be seen in the application interface, so it means that before releasing the new system I have a dependency on ""shipping"" micro service and the application interface, because without both developments I cant fully test the user requirements before deploying to production.</p>

<p>P.S. I'm sorry for any confusion in this post, but I complety new at this topic.</p>
",https://stackoverflow.com/questions/42289439/how-to-manage-continuous-delivery-with-micro-services,"['jenkins', 'microservices', 'jenkins-pipeline', 'continuous-delivery']",528,TRUE,0,1
"How to debug why PHP FTP won&#39;t work in PASV mode, when console FTP seems to work fine?","<p>I have a Docker Compose system for testing, in which I am doing end-to-end testing of a single-page web app. Several buttons in the web site will result in an FTP connection being initiated in one container (<code>missive-transmitter</code>), going to a test FTP server in another container (<code>missive-testbox</code>).</p>
<p>My FTP logic in PHP always uses &quot;passive&quot; mode, and I think this is causing the problem. I have created a script to run in <code>missive-transmitter</code>, which is a simplified version of the real thing. It is as follows, and is run directly from the console:</p>
<pre><code>&lt;?php
# ftptest.php

error_reporting(-1);
ini_set('display_errors', true);

$conn = ftp_connect('missive-testbox', 21);

$ok1 = ftp_login($conn, 'missive_test', 'password');
if (!$ok1)
{
    die(&quot;Cannot log in\n&quot;);
}

// *** Start problem section
$ok2 = ftp_pasv($conn, true);
if (!$ok2)
{
    die(&quot;Cannot switch to passive mode\n&quot;);
}
// *** End problem section

$info = ftp_systype($conn);
echo &quot;Info: $info\n&quot;;

$ok3 = ftp_put($conn, 'ftptest.php', 'ftptest.php', FTP_ASCII);
if (!$ok3)
{
    die(&quot;Cannot send a file\n&quot;);
}
</code></pre>
<p>Now, if I remove the <code>***</code> section (enabling passive mode) then the script will work. If I leave it in, I get this:</p>
<blockquote>
<p>Info: UNIX</p>
<p>Warning: ftp_put(): php_connect_nonb() failed: Operation in progress (115) in /root/src/ftptest.php on line 23</p>
<p>Warning: ftp_put(): TYPE is now ASCII in /root/src/ftptest.php on line 23</p>
<p>Cannot send a file</p>
</blockquote>
<p>I would like my FTP operation to work in PASV mode.</p>
<p>Oddly, if I install an FTP client then it seems to work in either active or passive modes, which is what I don't understand. On the <code>missive-transmitter</code> side:</p>
<pre><code>~/src $ # This is the `sh` shell in `missive-transmitter`
~/src $ #
~/src $ # Install LFTP in Alpine environment
~/src $ apk add lftp
~/src $ lftp missive_test@missive-testbox
Password: 
lftp missive_test@missive-testbox:~&gt; set ftp:passive-mode off         
lftp missive_test@missive-testbox:~&gt; put ftptest.php       
457 bytes transferred                            
lftp missive_test@missive-testbox:/&gt; set ftp:passive-mode on 
lftp missive_test@missive-testbox:/&gt; put ftptest.php        
457 bytes transferred
lftp missive_test@missive-testbox:/&gt; 
</code></pre>
<p>Is PHP doing something differently, or am I not actually using PASV mode in the console client?</p>
<p>I have confirmed that both containers can <code>ping</code> each other from their respective <code>sh</code> consoles. They are on the same (custom) Docker network.</p>
<p>The <code>missive-testbox</code> Docker container is based on <code>gists/pure-ftpd</code>, so it should be configured correctly as far as I know.</p>
<h2>Update</h2>
<p>A useful point in an answer below is about how NAT might be making one side make a connection using the wrong IP address. However, the IP addresses appear to be on the same subnet, though I am no networking expert.</p>
<p>From <code>missive-transmitter</code>:</p>
<pre><code>~ # ping missive-testbox
PING missive-testbox (172.19.0.2): 56 data bytes
64 bytes from 172.19.0.2: seq=0 ttl=64 time=0.076 ms
</code></pre>
<p>And from <code>missive-testbox</code>:</p>
<pre><code>~ # ping missive-transmitter
PING missive-transmitter (172.19.0.4): 56 data bytes
64 bytes from 172.19.0.4: seq=0 ttl=64 time=0.119 ms
</code></pre>
<p>I <em>think</em> the fact they are both <code>172.19.0.x</code> addresses means they should be able to see each other fully, though I am open to correction on that assumption.</p>
<h2>Update 2</h2>
<p>It has been suggested that getting some FTP client or server logs would be a good way to debug this. The client is pretty easy. Here are the same ops as above, but in LFTP's debug mode.</p>
<p>Active mode is first:</p>
<pre><code>~/src # lftp -d missive_test@missive-testbox
Password: 
---- Resolving host address...
---- 1 address found: 172.19.0.2
lftp missive_test@missive-testbox:~&gt; set ftp:passive-mode off
lftp missive_test@missive-testbox:~&gt; put ftptest.php
---- Connecting to missive-testbox (172.19.0.2) port 21
&lt;--- 220-Welcome to Pure-FTPd.
&lt;--- 220-You are user number 1 of 5 allowed.
&lt;--- 220-Local time is now 17:54. Server port: 21.
&lt;--- 220-This is a private system - No anonymous login
&lt;--- 220-IPv6 connections are also welcome on this server.
&lt;--- 220 You will be disconnected after 15 minutes of inactivity.
---&gt; FEAT
&lt;--- 530 You aren't logged in
---&gt; AUTH TLS
&lt;--- 500 This security scheme is not implemented
---&gt; USER missive_test
&lt;--- 331 User missive_test OK. Password required
---&gt; PASS XXXX
&lt;--- 230 OK. Current directory is /              
---&gt; FEAT
&lt;--- 500 Unknown command
---&gt; PWD
&lt;--- 257 &quot;/&quot; is your current location
---&gt; TYPE I
&lt;--- 200 TYPE is now 8-bit binary
---&gt; PORT 172,19,0,4,159,62
&lt;--- 200 PORT command successful
---&gt; ALLO 457
&lt;--- 500 Unknown command
---&gt; STOR ftptest.php
---- Accepted data connection from (172.19.0.2) port 20
&lt;--- 150 Connecting to port 40766
---- Closing data socket
&lt;--- 226-File successfully transferred
&lt;--- 226 0.000 seconds (measured here), 3.16 Mbytes per second
---&gt; SITE UTIME 20171030154823 ftptest.php
&lt;--- 500 Unknown command
---&gt; SITE UTIME ftptest.php 20171030154823 20171030154823 20171030154823 UTC
&lt;--- 500 Unknown command
457 bytes transferred
</code></pre>
<p>OK, that was successful. Here is the passive version in LFTP, again successful.</p>
<p>I notice the warning at the start, about an address needing to be fixed - could that be relevant? If either side advertises itself to the other as &quot;localhost&quot;, that might be a problem <code>:-)</code>:</p>
<pre><code>lftp missive_test@missive-testbox:/&gt; set ftp:passive-mode on 
lftp missive_test@missive-testbox:/&gt; put ftptest.php        
---&gt; PASV
&lt;--- 227 Entering Passive Mode (127,0,0,1,117,54)
---- Address returned by PASV seemed to be incorrect and has been fixed
---- Connecting data socket to (172.19.0.2) port 30006
---- Data connection established
---&gt; STOR ftptest.php
&lt;--- 150 Accepted data connection
---- Closing data socket
&lt;--- 226-File successfully transferred
&lt;--- 226 0.000 seconds (measured here), 1.79 Mbytes per second
457 bytes transferred
</code></pre>
",https://stackoverflow.com/questions/47020129/how-to-debug-why-php-ftp-wont-work-in-pasv-mode-when-console-ftp-seems-to-work,"['php', 'ftp', 'passive-mode']",6686,TRUE,2,2
Angular Router example Best way to upgrade to include .angular-cli.json and bypass Cannot read property &#39;config&#39; of null,"<p>I tried downloading the Routing and Navigation example from this <a href=""https://angular.io/guide/router#overview"" rel=""nofollow noreferrer"">page</a></p>

<p>Here's the link to the specific <a href=""https://angular.io/generated/zips/router/router.zip"" rel=""nofollow noreferrer"">zip</a>.</p>

<p>I run the following sequence of commands:</p>

<ol>
<li><strong>npm install</strong></li>
<li><strong>npm install --save-dev @angular/cli@latest</strong> </li>
<li><strong>ng -v</strong></li>
<li><strong>ng serve -o</strong></li>
</ol>

<p>From what I can make out <strong>Cannot read property 'config' of null</strong>
is somehow related to a bad version of the CLI. But if I create a new project I can start it successfully with my existing setup</p>

<ol>
<li><strong>ng new router</strong></li>
<li><strong>cd router</strong></li>
<li><strong>npm install</strong></li>
<li><strong>ng serve -o</strong></li>
</ol>

<p>Old directory structure (from zip download) includes these files:</p>

<ul>
<li>bs-config.json</li>
<li>e2e-spec.ts<br/></li>
</ul>

<p>New directory structure (from ng new):<br/></p>

<ul>
<li>.angular-cli.json</li>
<li>e2e is a folder with files inside</li>
<li>karma.conf.js</li>
<li>protractor.conf.js</li>
<li>tsconfig.json</li>
</ul>

<p><strong>Is there some sort of ng upgrade command to convert a project?</strong><br/>
There was some talk on <a href=""https://github.com/angular/angular-cli/issues/755"" rel=""nofollow noreferrer"">Git about <strong>ng init</strong></a>, but that seems to now be a thing of the past.<br/>
I believe most of the files are related to end to end testing.</p>

<pre>
    npm install
    npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

    > phantomjs-prebuilt@2.1.14 install /opt/AngularProjects/router/node_modules/phantomjs-prebuilt
    > node install.js

    PhantomJS not found on PATH
    Download already available at /var/folders/xz/sgpc803n1ms6xpc5n571ytc80000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip
    Verified checksum of previously downloaded file
    Extracting zip contents
    Removing /opt/AngularProjects/router/node_modules/phantomjs-prebuilt/lib/phantom
    Copying extracted folder /var/folders/xz/sgpc803n1ms6xpc5n571ytc80000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1498561599287/phantomjs-2.1.1-macosx -> /opt/AngularProjects/router/node_modules/phantomjs-prebuilt/lib/phantom
    Writing location.js file
    Done. Phantomjs binary available at /opt/AngularProjects/router/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs

    > fsevents@1.1.2 install /opt/AngularProjects/router/node_modules/fsevents
    > node install

    [fsevents] Success: ""/opt/AngularProjects/router/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node"" already installed
    Pass --update-binary to reinstall or --build-from-source to recompile
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 767 packages in 20.239s


    ng serve -o
    Unable to find ""@angular/cli"" in devDependencies.

    Please take the following steps to avoid issues:
    ""npm install --save-dev @angular/cli@latest"" 

    You have to be inside an Angular CLI project in order to use the serve command.
    /opt/AngularProjects/router>


    npm install --save-dev @angular/cli@latest
    npm WARN prefer global node-gyp@3.6.2 should be installed with -g

    > node-sass@4.5.3 install /opt/AngularProjects/router/node_modules/node-sass
    > node scripts/install.js

    Cached binary found at /Users/jgf/.npm/node-sass/4.5.3/darwin-x64-57_binding.node

    > node-sass@4.5.3 postinstall /opt/AngularProjects/router/node_modules/node-sass
    > node scripts/build.js

    Binary found at /opt/AngularProjects/router/node_modules/node-sass/vendor/darwin-x64-57/binding.node
    Testing binary
    Binary is fine
    + @angular/cli@1.1.3
    added 431 packages in 17.132s

    ==
    ng -v
        _                      _                 ____ _     ___
       / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
      / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
     / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
    /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                   |___/
    @angular/cli: 1.1.3
    node: 8.1.2
    os: darwin x64
    @angular/animations: 4.2.4
    @angular/common: 4.2.4
    @angular/compiler: 4.2.4
    @angular/compiler-cli: 4.2.4
    @angular/core: 4.2.4
    @angular/forms: 4.2.4
    @angular/http: 4.2.4
    @angular/platform-browser: 4.2.4
    @angular/platform-browser-dynamic: 4.2.4
    @angular/platform-server: 4.2.4
    @angular/router: 4.2.4
    @angular/tsc-wrapped: 4.2.4
    @angular/upgrade: 4.2.4
    @angular/cli: 1.1.3


    ng serve -o
    Cannot read property 'config' of null
    TypeError: Cannot read property 'config' of null
        at Class.run (/opt/AngularProjects/router/node_modules/@angular/cli/tasks/serve.js:22:63)
        at check_port_1.checkPort.then.port (/opt/AngularProjects/router/node_modules/@angular/cli/commands/serve.js:110:26)
        at 
        at process._tickCallback (internal/process/next_tick.js:169:7)

</pre>

<p>In relation to the error in:<br/>
/opt/AngularProjects/router/node_modules/@angular/cli/tasks/serve.js<br/>
we have:<br/></p>

<pre><code>const config_1 = require(""../models/config"");
...
const projectConfig = config_1.CliConfig.fromProject().config;
</code></pre>

<p>I suspect this pertains to a missing <strong>.angular-cli.json</strong> file.
/opt/AngularProjects/router/node_modules/@angular/cli/models/config.d.ts<br/>
and<br/>
/opt/AngularProjects/router/node_modules/@angular/cli/models/config.js<br/>
refer to it.</p>
",https://stackoverflow.com/questions/44779294/angular-router-example-best-way-to-upgrade-to-include-angular-cli-json-and-bypa,"['angular2-routing', 'angular-cli']",656,TRUE,0,2
