protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Bug Report: increasing XAMPP sql ram will cause protractor not to wait for angular correctly

Open T3KT4K opened this issue 10 years ago • 6 comments

Bug report In the hopes of increasing the speed of my tests, I attempted to increase the speed of the WebServer that I was testing, because, at least theoretically, the speeds of protractor tests are really only limited by the speed at which the WebServer is operating. I am aware that by placing browser.sleep and browser.wait I could fix this problem, but this is ugly and according to how protractor works, I should not have to do this (as protractor is supposed to wait for angular automatically).

-Node Version (using npm -v): 2.14.20 -Protractor Version: 3.2.1 -Browser(s): chrome (webdriver-manager) -Operating System and Version W10 10586.164 -Your protractor configuration file (confidential parts omitted)

exports.config = {
    framework: 'jasmine2',
    seleniumAddress: 'http://localhost:4444/wd/hub',
    restartBrowserBetweenTests: false,
    jasmineNodeOpts: {defaultTimeoutInterval: 120000, isVerbose: true},
    multiCapabilities: [{'browserName': 'chrome', sharedTestFiles: false, maxInstances: 5}],
    suites: {
        //confidential suites(there are quite a few)
    },
    onPrepare: function () {
        var jasmineReporters = require('jasmine-reporters');
        //add jasmine reporter
        jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
            consolidateAll: true,
            savePath: 'testresults',
            filePrefix: 'xmloutput'
        }));
        var SpecReporter = require('jasmine-spec-reporter');
        // add jasmine spec reporter
        jasmine.getEnv().addReporter(new SpecReporter({
            displayStacktrace: 'all', // display stacktrace for each failed assertion, values: (all|specs|summary|none) 
            displayFailuresSummary: true, // display summary of all failures after execution 
            displayPendingSummary: true, // display summary of all pending specs after execution 
            displaySuccessfulSpec: true, // display each successful spec 
            displayFailedSpec: true, // display each failed spec 
            displayPendingSpec: true, // display each pending spec 
            displaySpecDuration: true, // display each spec duration 
            displaySuiteNumber: false, // display each suite number (hierarchical) 
            colors: {
                success: 'green',
                failure: 'red',
                pending: 'yellow'
            },
            prefixes: {
                success: '✓ ',
                failure: '✗ ',
                pending: '* '
            },
            customProcessors: []

        }));
        //interact with nonAngular Login Page:
        browser.ignoreSynchronization = true;
        var loginPage = require('./pageObjects/loginPage.js');
        loginPage.loginPage.login(confidential url, confidential user, confidential password);
        browser.sleep(1000);
        browser.ignoreSynchronization = false;
   };
  • Output from running the test (some irrelevant confidential information omitted):
DEBUG - Running with --troubleshoot
DEBUG - Protractor version: 3.2.1
DEBUG - Your base url for tests is undefined
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
DEBUG - WebDriver session successfully started with capabilities Capabilities {
  'applicationCacheEnabled' => false,
  'rotatable' => false,
  'mobileEmulationEnabled' => false,
  'chrome' => { chromedriverVersion: '2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4)',
  userDataDir: omitted },
  'takesHeapSnapshot' => true,
  'databaseEnabled' => false,
  'handlesAlerts' => true,
  'hasTouchScreen' => false,
  'version' => '49.0.2623.87',
  'platform' => 'XP',
  'browserConnectionEnabled' => false,
  'nativeEvents' => true,
  'acceptSslCerts' => true,
  'webdriver.remote.sessionid' => '10664570-ec3f-4b7e-b11e-6250ff143c0d',
  'locationContextEnabled' => true,
  'webStorageEnabled' => true,
  'browserName' => 'chrome',
  'takesScreenshot' => true,
  'javascriptEnabled' => true,
  'cssSelectorsEnabled' => true }
DEBUG - Running with spec files (omitted)
+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+
|T|e|s|t|i|n|g| |F|r|a|m|e|w|o|r|k|
+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+
Spec started

 test file {omitted}
    ✗ {test name omitted} (11 secs)
      - Failed: unknown error: Element is not clickable at point (315, 257). Other element would receive the click: <div class="ngdialog-overlay"></div>
  (Session info: chrome=49.0.2623.87)
  (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 10.0 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 32 milliseconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'ERROR-0294', ip: '192.168.0.32', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_73'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={chromedriverVersion=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4), userDataDir=C:\Users\{omitted}\AppData\Local\Temp\scoped_dir4284_3027}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=49.0.2623.87, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 80313b8fae168440996206a013ea2942
...

-Steps to reproduce the bug:

  1. Open the xampp control panel
  2. Stop MySQL (if it is running)
  3. On the MySQL line, Click on Config->my.ini
  4. In my.ini go to line 144 which should contain: #innodb_buffer_pool_size = 16M
  5. Change the line to: innodb_buffer_pool_size = 128M (remember to uncomment it!)
  6. Save and Exit my.ini.
  7. Reopen the XAMPP control panel
  8. Start MySQL (or stop and restart it if you missed step 2 :wink:)
  9. wait for the MySQL port to contain a port (this means that it is ready to be used)
  10. run any (previously) working tests

T3KT4K avatar Mar 30 '16 07:03 T3KT4K

I'm not quite sure I understand how this is an issue with protractor? The failure also seems to not be related to a synchronization timeout error but something in your application. Increasing the performance of your application may help angular load faster but I don't see any connection to a failure in protractor.

I'll leave this open for now, but it's my vote to close it unless we can isolate an issue with Protractor.

NickTomlin avatar Mar 30 '16 15:03 NickTomlin

@NickTomlin did you attempt to reproduce the problem? the application works find when being used by a normal user both before and after the change in ram. however, the protractor tests work before the change and stop working after the change. This application is behaving properly, while it seems that protractor is not.

T3KT4K avatar Mar 30 '16 16:03 T3KT4K

I cannot reproduce the problem because I don't have your application code or system setup. The only change I can see is that you are allowing MySQL to use more memory; which points to an issue with your application setup/system and not a bug in protractor.

If you can provide a simple reproducible case that I can run without heavily altering my own system i'd be more than happy to help investigate. Otherwise this becomes an issue that is better debugged/resolved through StackOverflow or other channels.

I hope that makes sense, i'm not try to dismiss your problem but rather to ensure that the Protractor queue is focused on issues that are present in Protractor itself :smile:

NickTomlin avatar Mar 30 '16 17:03 NickTomlin

@NickTomlin I appreciate your time and completely understand you reluctance to heavily alter your system. Upon rereading my report, I see that I really did not give you enough information to reproduce the problem very easily. upon further examination. it looks like the error is in how protractor is waiting for loading in a specific way. the reason that increasing the ram made a difference is because it made loading happen differently. Would it be preferred to just close this issue and continue in a new one?

T3KT4K avatar Mar 31 '16 06:03 T3KT4K

Yes, I think closing this one and creating a new one that focuses on protractor itself makes sense. Thanks! :smile:

NickTomlin avatar Mar 31 '16 21:03 NickTomlin

I'm going to go ahead and close this now just to keep things clean. Thanks!

NickTomlin avatar Apr 01 '16 13:04 NickTomlin