header.navigation

    SOFTWARE TESTING

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

    Laycee

    @Laycee

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

    Laycee follow

    pages:account/best, Laycee

    • Create and delete users before and after each API integration test

      There are endpoints in a simplified form on the server:

      GET / users
      POST / users - create a user
      GET / users / {id}
      DELETE / users / {id}

      Server and client are on the same server. They have a common database for testing sqlite. Let's say I have a test for each endpoint. In each test, an http request is sent to the endpoint using the http client, as if it were a consumer (consumer), and the response is checked for correctness. Before the very beginning of the tests, an empty database is created and the migration is rolled. After finishing the tests, the database is deleted.

      My problem is that before each test I need to create 7 users with fake data. And after the test, so that they are "deleted".

      First, I did the database through transactions, the test starts and a transaction is started on the client, 7 users are created, in the test there is an http request for GET / users, but there is no transaction on the server and an empty database. Therefore, this option is eliminated.

      If you do without a transaction, then shared database data is the same on the client and the server due to the fact, but I need only 7 users before each test so that previous manipulations with the database do not distort the data. Therefore, this option is also eliminated.

      I tried the option where the database is deleted and migrated before each test. It works but for a very long time (it takes a minute to check 4 endpoints). Database in memory would speed up a lot here, but here is the same problem as with a transaction.

      I just can't find a solution. What can you advise? I want to test all endpoints not through functional tests inside the code, but as if from the outside (as an interface is tested using selenium).

      global:posted_in, API Testing
      Laycee
      Laycee

    pages:account/latest-posts, Laycee

    • How to find elements by multiple different xpaths

      I have this bit of code, I am not sure why it is not working.

      String xpath1="//span[contains(text(),'I am span')]";
      String xpath2="//div[contains(text(),'I am Div')]";
      String xpath3="//input[contains(text(),'I am input')]";
      

      then I combnie all the xpaths like this.

      String majorxpath="\""+xpath1+" or "+xpath2+" or "+xpath3+"\"";
      List<Webelemnt> results=driver.findelements(By.xpath(majorxpath));
      

      This returns error, unable to locate an elemnent by majorxpath.

      Please note that, I want to evaluate xpath1, xpath2, xpath 3 together and if any of them exists, the webelemnt should return in results

      Also, note the xpaths work individually but I want to see if any of them are existing and return the webElemnt.

      global:posted_in, Automated Testing
      Laycee
      Laycee
    • RE: Fetch console logs error code selenium js

      Here is how can you do it

      require('chromedriver');
      
      const path = require('path');
      const wd = require('selenium-webdriver');
      const chrome = require('selenium-webdriver/chrome');
      
      var builder = new wd.Builder();
      var options = new chrome.Options();
      var prefs = new wd.logging.Preferences();
      var driver;
      
      prefs.setLevel(wd.logging.Type.BROWSER, wd.logging.Level.ALL);
      options.setLoggingPrefs(prefs);
      
      driver = builder
          .forBrowser(wd.Browser.CHROME)
          .setChromeOptions(options)
          .build();
      
      driver
          .get(`file://${path.resolve(__dirname, './page.html')}`)
          .then(() => driver.manage().logs().get(wd.logging.Type.BROWSER))
          .then((logs) => {
              console.log(logs);
          })
          .then(() => driver.quit());
      
      global:posted_in, Automated Testing
      Laycee
      Laycee
    • RE: How to run Selenium Tests written in C# on a Safari browser in the same Windows 10 laptop?

      Apple's support for Safari on Windows stopped at 5.1 version, which means the latest safari you can install on Windows in Safari 5.1.

      Second - no docker images for Safari -

      Third, you can create a Machintosh VM on your PC
      here is the link for Catalina
      here is the link for Mojave

      if you add one of those on your machine you also need to enable Safari automation

      1. Open Safari
      2. Go to Safari > Preferences
      3. Go to Advanced and in the bottom, there is an option "Show Develop menu in menu bar"
      4. Check that option
      5. Go to Develop
      6. Check on "Allow Remote Automation"
      7. Close/Quit the browser

      After that, you can run the selenium node script on mac in order to connect it from the grid. And you can also use as a grid the docker-selenium

      global:posted_in, Automated Testing
      Laycee
      Laycee
    • RE: Test scenarios for preview feature functionality?

      Listing few of them below:

      • Verify whether all the fields filled are populated and are being displayed on preview screen.
      • If you are using any form of WYSIWYG editor, then make sure the applied font formats like bold, italic are visible on preview screen.
      • If there is any sort of media field in use like an image or a video, verify whether the media is also being displayed on preview screen.
      • Verify the indentation of text and other kind of elements on preview screen .
      • Verify whether the links are displayed as hyper-links on preview screen.
      • Verify other types of features that are being used. For e.g. Is a tabular format displayed correctly? Are the quotes displayed correctly. In short all,sorts of formatting options available.
      • Always, verify the new changes are displayed on preview screen. Hope this helps you in designing more such scenarios.
      • For any kind of input fields like text field,text area, check-boxes, radio buttons etc. Verify that they are read-only and user cannot modify them on preview screen.
      global:posted_in, Manual Testing
      Laycee
      Laycee
    • RE: Best way to track defects from Automation testing and Manual testing separately in JIRA?

      In my team we track tickets deviation by using two things:

      Jira filters subscription for cases where we need plain(to one person/lead/manager) notification, but without fields analysis
      https://confluence.atlassian.com/jira064/receiving-search-results-via-email-720416706.html?_ga=2.134616433.1430628443.1592459825-259335427.1591590509
      https://confluence.atlassian.com/jira064/receiving-search-results-via-email-720416706.html?_ga=2.134616433.1430628443.1592459825-259335427.1591590509

      https://github.com/dgroup/lazylead for cases where we need automatically check ticket fields, comments, links and alert corresponding person, assignee or reporter. Please note that i'm author of https://github.com/dgroup/lazylead app.

      global:posted_in, Manual Testing
      Laycee
      Laycee
    • What to focus on when estimating a software testing task?

      What to focus on? What to Estimate? How to understand how long a Task would take to complete?

      global:posted_in, Test Management
      Laycee
      Laycee
    • Create and delete users before and after each API integration test

      There are endpoints in a simplified form on the server:

      GET / users
      POST / users - create a user
      GET / users / {id}
      DELETE / users / {id}

      Server and client are on the same server. They have a common database for testing sqlite. Let's say I have a test for each endpoint. In each test, an http request is sent to the endpoint using the http client, as if it were a consumer (consumer), and the response is checked for correctness. Before the very beginning of the tests, an empty database is created and the migration is rolled. After finishing the tests, the database is deleted.

      My problem is that before each test I need to create 7 users with fake data. And after the test, so that they are "deleted".

      First, I did the database through transactions, the test starts and a transaction is started on the client, 7 users are created, in the test there is an http request for GET / users, but there is no transaction on the server and an empty database. Therefore, this option is eliminated.

      If you do without a transaction, then shared database data is the same on the client and the server due to the fact, but I need only 7 users before each test so that previous manipulations with the database do not distort the data. Therefore, this option is also eliminated.

      I tried the option where the database is deleted and migrated before each test. It works but for a very long time (it takes a minute to check 4 endpoints). Database in memory would speed up a lot here, but here is the same problem as with a transaction.

      I just can't find a solution. What can you advise? I want to test all endpoints not through functional tests inside the code, but as if from the outside (as an interface is tested using selenium).

      global:posted_in, API Testing
      Laycee
      Laycee