Navigation

    SOFTWARE TESTING

    • Register
    • Login
    • Search
    • Job Openings
    • Freelance Jobs
    • Companies
    • Conferences
    • Courses
    1. Home
    2. baileigh
    B
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    baileigh

    @baileigh

    1
    Reputation
    29935
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    baileigh Follow

    Best posts made by baileigh

    • RE: JUnit + Maven. How to do something before and after all tests?

      In general, this solution will be useful to anyone who wants to test consistently and in a given order.

      It creates a suite, where in the annotation we list the classes in the order of execution:

      @RunWith (Suite.class)
      @ Suite.SuiteClasses ({OpenConnection.class,
                       GetServerIdTest.class,
                       ModbusStatusCodesTest.class,
                       ModbusSerialTransactionTest.class,
                       CloseConnection.class})
      public class OrderedTestSuite {}
      

      Add the plugin to pom.xml:

      <plugin>
               <groupId> org.apache.maven.plugins </groupId>
               <artifactId> maven-surefire-plugin </artifactId>
               <configuration>
                   <includes>
                       <include> ** / OrderedTestSuite.class </include>
                   </includes>
               </configuration>
      </plugin>
      
      posted in Automated Testing
      B
      baileigh

    Latest posts made by baileigh

    • What is Google up to? Google Play Store updating apps even though auto-update is disabled

      Recently, I've noticed Google Play Store automatically "updating" apps, even when auto-updates are explicitly disabled.

      I put "updating" in quotes, because all the apps in question don't truly have any updates available (according to the Google Play Store). Yet Google Play Store is downloading updates for these apps, and tools like SD Maid indicate recent "Last update" dates for each of these apps.

      This updating is happening to almost every app. It's not limited to 1 or 2 apps, or a few specific developers.

      An example is https://play.google.com/store/apps/details?id=com.ng_labs.dateandtime.pro . Google Play Store indicates the last update for that app was the 25th of December, 2020. But I caught Google Play Store updating that app today.

      I suspect Google changed some policies and either Google itself is pushing updates to non-Google apps, or developers are scrambling to issue new "updates", even when no new functionality is added. But what's really weird is that the Google Play Store does not indicate any recent updates for any of these apps, and version numbers are not incremented.

      Those are just my guesses. What's really going on?

      posted in Mobile Testing
      B
      baileigh
    • RE: "media: inaccessible or not found" error when attempting to control device volume via ADB

      In Android 11 and Android 12, media utility no longer exists. That's why you got the error since your shell could not find the utility in locations mentioned in its PATH. That utility's commands have been moved to a service name MediaSessionService. To access those commands invoke this service using cmd command.

      adb shell cmd media_session
      

      Example:

      $ cmd media_session                                                                                                                           
      usage: media_session [subcommand] [options]
             media_session dispatch KEY
             media_session dispatch KEY
             media_session list-sessions
             media_session monitor 
             media_session volume [options]
      

      media_session dispatch: dispatch a media key to the system.
      KEY may be: play, pause, play-pause, mute, headsethook,
      stop, next, previous, rewind, record, fast-forword.
      media_session list-sessions: print a list of the current sessions.
      media_session monitor: monitor updates to the specified session.
      Use the tag from list-sessions.
      media_session volume: the options are as follows:
      --stream STREAM selects the stream to control, see AudioManager.STREAM_*
      controls AudioManager.STREAM_MUSIC if no stream is specified
      --set INDEX sets the volume index value
      --adj DIRECTION adjusts the volume, use raise|same|lower for the direction
      --get outputs the current volume
      --show shows the UI during the volume change
      examples:
      adb shell media volume --show --stream 3 --set 11
      adb shell media volume --stream 0 --adj lower
      adb shell media volume --stream 3 --get

      The examples section above has not been updated in the source code to reflect new changes, that's why it still recommends using media or adb shell media.

      posted in Mobile Testing
      B
      baileigh
    • My Android 12 can resolve hostnames but can't connect directly to IP adress?

      I'm facing a weird behavior when using mobile data. My Sony Xperia 5 mark II on Android 12 with Magisk root can connect to the Internet if I connect to the URL. However if I try to connect directly to the IP address, it doesn't work (network unreachable according to my web browser).

      This seems to be system-wide: For instance I can ping google.com but I can't ping 8.8.8.8 (or whatever IP is behind google.com). I can also connect to my own VPN server using Wireguard if I set the "host server" with my own .fr domain but not with my VPN server's IP.

      I don't unterstand at all this issue. I tried cleaning arp table, DNS cache,... When I disable Magisk the issue isn't solved either. I don't especially know when it started...

      Do you have any clue ? Thanks

      posted in Mobile Testing
      B
      baileigh
    • XPath contains(text(), 'string') does not work, but partialLinkText('sameString') works

      I'm trying to learn Selenium on Java, can't for the life of me figure out why xpath contain can't find the right element.
      Here's the whole case:

      @Test
      public void test1_FluentWait() {
          driver.get("https://www.google.com");
          WebElement searchBar = driver.findElement(By.xpath("//input[contains(@name, 'q')]"));
          searchBar.sendKeys("Selenium", Keys.ENTER);
      
      Wait<WebDriver> fluentWait = new FluentWait<WebDriver>(driver)
              .withTimeout(Duration.ofSeconds(30))
              .pollingEvery(Duration.ofSeconds(5))
              .ignoring(NoSuchElementException.class);
      
      WebElement element = fluentWait.until(new Function<WebDriver, WebElement>() {
          @Override
          public WebElement apply(WebDriver w) {
              // WebElement ele = w.findElement(By.xpath("//*[contains(text(), 'Selenium - Health Professional')]")); // Doesn't work, no idea why
              WebElement ele = w.findElement(By.partialLinkText("Selenium - Health Professional")); // works
              // WebElement ele = w.findElement(By.xpath("//*[text()='Selenium - Health Professional']"));
              // WebElement ele = w.findElement(By.xpath("//*[contains(@href, 'Selenium-HealthProfessional')]")); // Found attribute, can't click
              if (ele.isEnabled()) {
                  System.out.println("Found");
              }
              return ele;
          }
      });
      System.out.println(element.getText());
      // element.click();
      

      }

      Here's the element in question Google Search's element

      So basically, only the partialLinkText works when finding this element.

      WebElement ele = w.findElement(By.xpath("//*[contains(text(), 'Selenium - Health Professional')]")); // Doesn't work, no idea why
      WebElement ele = w.findElement(By.partialLinkText("Selenium - Health Professional")); // works
      WebElement ele = w.findElement(By.xpath("//*[text()='Selenium - Health Professional']"));
      

      contains text() prints "found" but the returned element's getText() prints empty string. click() throws ElementNotInteractableException
      text()='...' throws NoSuchElementException
      partialLinkText returns the element and allows click()

      What am I doing wrong? What is the issue here? How can I prevent this or know in the future which findElement to use?

      posted in Automated Testing
      B
      baileigh
    • RE: How to flash Lenovo Yoga Book that doesn't boot into the OS?

      Solved. I ran 'flash_update_from_user.json

      Just waiting for the battery to charge to 30% to hopefully enable the Halo Keyboard.

      Here are the files needed in case other links void in the future: https://drive.google.com/drive/folders/1gD9FyA03GbLZ7ZcjkyMDlhVPs4_em2rY?usp=sharing

      posted in Mobile Testing
      B
      baileigh
    • RE: How do I export my text messages from either my Android phone, or from the Android Messages web interface, with the timestamps?

      https://play.google.com/store/apps/details?id=com.riteshsahu.SMSBackupRestore can create local xml files in following format

      /storage/emulated/0/SMSBackupRestore/sms-20220130231717.xml

      
      
      
      posted in Mobile Testing
      B
      baileigh
    • SSH server on Shield w/Android 11

      I recently purchased a Shield running Android 11. I want to enable an SSH server on this box.

      I tried an SSHd app from the play store but it didn't seem to work. Looking at the websites for a couple of SSHd packages I see lots of warnings that SSH daemons will stop working as of Android 10.

      Does that mean SSHd is no longer available on Android 11? Is it possible to add/enable an SSHd service on a non-rooted android 11 box?

      posted in Mobile Testing
      B
      baileigh
    • RE: How can I configure the Google Stack application so that it only backs up when connected to a Wi-Fi network?

      This app isn't available in my country but I checked the reviews. 3 days ago this feature was requested by an user

      Developers commented that this would be added in an update due shortly

      enter image description here

      posted in Mobile Testing
      B
      baileigh
    • RE: installing a language rom file for the same phone but a different build number

      i did it becuase robert said that it'll be fine as long im not trying to meddle with too sensitive stuff such as hardware and whatnot. so it works as longas the change ain't too drastic

      posted in Mobile Testing
      B
      baileigh
    • RE: I can enter recovery but not sideload, and fastboot does not recognize the device

      "Format Data" via the TWRP recovery -> Advanced Wipe -> Reboot -> Reinstalling LineageOS 16 seemed to do the trick, and the OS now loads.

      (Interestingly, I still cannot identify the device via adb/fastboot, I wonder if the stock ROM will resolve that).

      posted in Mobile Testing
      B
      baileigh