header.navigation

    SOFTWARE TESTING

    • register
    • login
    • search
    • Job Openings
    • Freelance Jobs
    • Services
    • Conferences
    • Courses
    1. home
    2. Trenton
    T
    • profile
    • following
    • followers
    • topics
    • posts
    • best
    • header.groups

    Trenton

    @Trenton

    0
    reputation
    8
    posts
    1
    profile_views
    0
    followers
    0
    following
    joined lastonline

    Trenton follow

    pages:account/best, Trenton

    has_no_posts

    pages:account/latest-posts, Trenton

    • RE: Performance Testing vs Unit Testing

      In some situations you can use unit tests to make sure that an operation finishes within a certain time period. If you want to add more features to your operation, but you don't want to sacrifice performance you can use unit tests to assert that. Of course, these kind of unit tests are machine dependent, but you can throw some additional variables or configuration to the equation.

      global:posted_in, Performance, Load, Stress Testing
      T
      Trenton
    • RE: How to change firefox profile preference after defining webdriver using Selenium and Python?

      Selenium allows creating a custom profile for firefox and launching the browser with the same. Below is a sample code on how to change the download folder of the browser launched

      from selenium import webdriver
      
      profile = webdriver.FirefoxProfile()
      profile.set_preference("browser.download.folderList", 2)
      profile.set_preference("browser.download.manager.showWhenStarting", False)
      profile.set_preference("browser.download.dir", '/Users/tarunlalwani/Downloads/')
      profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/x-gzip")
      
      driver = webdriver.Firefox(firefox_profile=profile)
      

      This is good when you know the download folder while starting the browser or you are NOT interested in changing the download folder after the browser has starting.

      Automating configuration UI

      So my first attempt was to solve the problem using about:config UI interface

      profile = webdriver.FirefoxProfile()
      profile.set_preference("general.warnOnAboutConfig", False)
      
      driver = webdriver.Firefox(firefox_profile=profile)
      
      driver.get("about:config")
      
      def set_bool_preferce(name, value):
          value = 'true' if value else 'false';
      
          driver.execute_script("""
              document.getElementById("textbox").value = arguments[0];
              FilterPrefs();
              view.selection.currentIndex = 0;
      
              if (view.rowCount == 1) {
                 current_value = view.getCellText(0, {id:"valeuCol"});
                 if (current_value != arguments[1]) {
                     ModifySelected();
                 }
              } 
          """, name, value)
      
      
      def set_string_preferce(name, value):
      
          modified = driver.execute_script("""
              document.getElementById("textbox").value = arguments[0];
              FilterPrefs();
              view.selection.currentIndex = 0;
      
              if (view.rowCount == 1) {
                 current_value = view.getCellText(0, {id:"valeuCol"});
                 if (current_value != arguments[1]) {
                     ModifySelected();
                     return true;
                 }
              } 
      
              return false;
          """, name, value)
      
          if modified is None or modified is True:
              alert = driver.switch_to.alert
              alert.send_keys(value)
              alert.accept()
      
      
      set_string_preferce("browser.download.dir", '/Users/tarunlalwani/Downloads2/')
      
      driver.quit()
      

      This is bit complex than I would have wanted it to be. But thanks to @JamesUp, who provided a far easier JavaScript for the same

      Smaller and better JavaScript solution

      profile = webdriver.FirefoxProfile()
      profile.set_preference("general.warnOnAboutConfig", False)
      
      driver = webdriver.Firefox(firefox_profile=profile)
      
      driver.get("about:config")
      
      def set_bool_preferce(name, value):
          value = 'true' if value else 'false';
      
          set_string_preferce(name, value)
      
      def set_string_preferce(name, value):
          driver.execute_script("""
          var prefs = Components.classes["@mozilla.org/preferences-service;1"]
              .getService(Components.interfaces.nsIPrefBranch);
          prefs.setBoolPref(arguments[0], arguments[1]);
          """, name, value)
      
      global:posted_in, Automated Testing
      T
      Trenton
    • Valid equivalent partitions in a range from -100 to 100?

      I can't figure out this question.

      A program which accepts an integer in the range -100 to +100:

      1. How many valid equivalent partitions are there?
      2. For which range what are minimum and maximum values?
      3. Using BVA, what values need to be checked for the partitions?

      So..., according to the equivalence testing, you can have a valid and invalid value. I supposed the invalid values would be anything less than -100 and greater than 100. However I can't find information about how to get equivalent partitions.

      I mean, I can chose and say that it has 20 equivalent partitions, for example: -100 to -90 | -89 to 70 etc..., but: Is there a way to get this?

      For the other questions: Is it possible get the previous partition so the minimum value would be -100 and the maximum -90?

      global:posted_in, Manual Testing
      T
      Trenton
    • RE: Can I restore Test Cases/Test Suite I accidentally deleted from Azure DevOps?

      Unfortunately, according to this docs: https://docs.microsoft.com/en-us/azure/devops/boards/backlogs/delete-test-artifacts?view=azure-devops

      We only support permanent deletion of test artifacts such as test plans, test suites, test cases, shared steps and shared parameters. Deleted test artifacts won't appear in the recycle bin and cannot be restored.

      Thus the deleted test artifacts will be permanently deleted.

      global:posted_in, Manual Testing
      T
      Trenton
    • RE: What is integration testing?

      @zymir The pass/fail criteria of the test depends on the specification - on what result you expect from a particular module, in the case of integration testing - what do you expect as the result of the work of several modules in a bundle. The point of integration testing is to make sure that the modules work correctly in the process of interacting with each other, and not separately. For example, a criterion for the success of testing a class that filters data can be checking what data is found and whether there is extra data there. This is already at your mercy as a developer.

      global:posted_in, Manual Testing
      T
      Trenton
    • RE: What is integration testing?

      Integration testing differs from unit testing:

      Firstly, you will not test each module (class, block) separately, but several modules together. During integration testing (as opposed to unit testing), your IoC containers will not pass mocks (stubs) as dependencies, but real objects. For example, if you are testing a class method that filters objects received from the database, then in the case of unit testing, you will have to exclude working with the real database in order to speed up the test and in order to ensure that the test result will only be checked functionality of the tested class and its specific method.

      Secondly, the fact that integration testing does not necessarily have execution time constraints (in other words, no one needs a unit test that will run, let's say, a minute, which is quite acceptable for an integration test). This is due to the fact that during the integration testing process your code will work, for example, with a real database, the request to which will take a certain amount of time.

      According to your specific example, if the code was originally written so that it can be tested, then, in general, you will have three or four separate classes, each of which will be responsible for performing a specific task (according to the Single Responsibility principle), i.e. ... for data preparation, data processing, data distribution, data recording in the database. Each of these classes should use the functionality of the other class so that it can be easily replaced with another implementation. Those. substitute both a real object of another class and a stub, then integration testing is the same unit testing, but with the transfer of real dependencies. This is where Dependency Injection comes in.

      global:posted_in, Manual Testing
      T
      Trenton
    • RE: What tools do you use for cross browser testing?

      @jules I can install but what about versions?

      global:posted_in, Manual Testing
      T
      Trenton
    • What tools do you use for cross browser testing?

      What free tools do you use to test cross-browser sites? There are many paid online tools on the net, there are free ones that generate screenshots, but this takes a long time and does not give the desired result.

      All browsers cannot be installed on my PC.

      The main browsers I am interested in: Chrome, Firefox and Safari, Opera and everyone's favorite Internet Explorer.

      global:posted_in, Manual Testing
      T
      Trenton