Navigation

    SOFTWARE TESTING

    • Register
    • Login
    • Search
    • Job Openings
    • Freelance Jobs
    • Services
    • Conferences
    • Courses
    1. Home
    2. Alberto
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by Alberto

    • Alberto

      What should I use in .NET Core test project - HttpClient or RestSharp?
      API Testing • httpclient netcore restsharp • • Alberto  

      2
      0
      Votes
      2
      Posts
      1
      Views

      B

      Some prefer to use HttpClient because it is already built into the framework. So there's no need to add extra bloat to your project. RestSharp, like any library, is easier to use because someone already did the hard work and ironed out the problems gotten along the way. I have used both, and the one is not better than the another. It just depends on your use-case, situation and environment. I had a WebAPI proxy project that needed to call another REST API. I chose RestSharp at first because I was already familiar with it from using it in another project. However, I changed to HttpClient eventually because it uses the same return types as the WebAPI controllers, so it just saved me time from having to convert RestSharp's responses back to a HttpResponseMessage. Of course each one has its pros and cons, it just boils down to your use-case.
    • Alberto

      Jmeter doesn't show results when executed on slave, both GUI and CLI
      Performance, Load, Stress Testing • jmeter gui cli • • Alberto  

      3
      0
      Votes
      3
      Posts
      1
      Views

      D

      The .csv file in what the test are based must be in the slave inside the JMeter bin folder /bin/data/yourFile.csv
    • Alberto

      Test for Django REST API framework
      API Testing • rest api django • • Alberto  

      2
      1
      Votes
      2
      Posts
      3
      Views

      R

      The content of the response you can access using: response.content
    • Alberto

      How to distinguish an emulator from a physical device?
      Mobile Testing • android mobile testing ios emulator • • Alberto  

      2
      0
      Votes
      2
      Posts
      4
      Views

      R

      These lines will return true on the emulator: Build.PRODUCT.equals ("google_sdk"); Build.MODEL.equals ("google_sdk"); Build.HARDWARE.equals ("goldfish"); Build.MANUFACTURER.equals ("unknown"); These lines are for C#: global :: Android.OS.Build.Product global :: Android.OS.Build.Model global :: Android.OS.Build.HardWare global :: Android.OS.Build.Manufacturer But this is not always the case. You can try like this (Java example): if (Build.PRODUCT.matches (". * _? sdk _?. *")) { // - emulator - } else { // - other device - } Another way (Java): TelephonyManager tm = (TelephonyManager) getSystemService (Context.TELEPHONY_SERVICE); String networkOperator = tm.getNetworkOperatorName (); if ("Android" .equals (networkOperator)) { // Emulator } else { // Device } That is, if you need to be 100% sure that this is an emulator, you will have to combine methods. For example @AndroidCrop function (Java): public static final boolean isEmulator () { int rating = 0; if ((Build.PRODUCT.equals ("sdk")) || (Build.PRODUCT.equals ("google_sdk")) || (Build.PRODUCT.equals ("sdk_x86")) || (Build.PRODUCT.equals ("vbox86p"))) { rating ++; } if ((Build.MANUFACTURER.equals ("unknown")) || (Build.MANUFACTURER.equals ("Genymotion"))) { rating ++; } if ((Build.BRAND.equals ("generic")) || (Build.BRAND.equals ("generic_x86"))) { rating ++; } if ((Build.DEVICE.equals ("generic")) || (Build.DEVICE.equals ("generic_x86")) || (Build.DEVICE.equals ("vbox86p"))) { rating ++; } if ((Build.MODEL.equals ("sdk")) || (Build.MODEL.equals ("google_sdk")) || (Build.MODEL.equals ("Android SDK built for x86"))) { rating ++; } if ((Build.HARDWARE.equals ("goldfish")) || (Build.HARDWARE.equals ("vbox86"))) { rating ++; } if ((Build.FINGERPRINT.contains ("generic / sdk / generic")) || (Build.FINGERPRINT.contains ("generic_x86 / sdk_x86 / generic_x86")) || (Build.FINGERPRINT.contains ("generic / google_sdk / generic")) || (Build.FINGERPRINT.contains ("generic / vbox86p / vbox86p"))) { rating ++; } return rating> 4; }
    • 1 / 1