Navigation

    SOFTWARE TESTING

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

    Posts made by Alberto

    • What should I use in .NET Core test project - HttpClient or RestSharp?

      I've been scouring the internet all day for a simple comparison, but have yet to find any up to date information regarding the subject.

      I recently joined a team working on a project that is using RestSharp for all API calls. I have previously implemented an HttpClient via the CreateClient method of the .NET Core IHttpclientFactory.

      I'm looking for objective pros/cons regarding each for calling REST endpoints. Is this simply a matter of preference? Is there any underlying difference in how the HttpClient lifecycle is managed between the RestSharp library and the IHttpClientFactory implementation?

      I have noticed, or at least it appears to me, that I am not able to manage the incoming response on as granular a level, but for the sake of the question being asked, let's just chalk that up to my lack of experience with RestSharp.

      posted in API Testing
      Alberto
      Alberto
    • Jmeter doesn't show results when executed on slave, both GUI and CLI

      Introduction:
      I'm new to Jmeter, so I'm working with basic tasks but I have a mentor. We are working with distributed architecture, one master and one slave in my local network executing a real world working testplan.

      Problem:
      No response from slave:
      We have installed and configured Jmeter 5.3 and java version "1.8.0_271" in both slave and master with windows 10 machines. Each machine can ping the other. When the testplan is executed in the master, from the JMeter GUI or CLI, the slave recognize the order and start the proccess, it also notify the end, but there is no response in the .jtl file another than the file header. We have tryed with RMI enabled and disabled. The logs dont show errors.

      System specs: OS W10, Jmeter 5.3, Java 1.8, Jmeter plugin: jmeter-plugins-manager-1.4.jar (Plugins installed: Custom Thread Groups, 3 Basic Graphs, Console Status Logger), Windows Firewall is disabled in both machines, Jmeter properties (Master remote_hosts: Slave ip, Slave remote_hosts: 127.0.0.1)

      JMeter GUI execution log (Master):

      2020-12-11 11:33:45,446 INFO o.a.j.e.DistributedRunner: Configuring remote engine: 192.168.1.135 2020-12-11 11:33:45,446 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,624 INFO o.a.j.e.DistributedRunner: Starting distributed test with remote engines: [192.168.1.135] @ Fri Dec 11 11:33:45 CET 2020 (1607682825623) 2020-12-11 11:33:45,624 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method 2020-12-11 11:33:45,629 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,629 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,630 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000 2020-12-11 11:33:45,630 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run 2020-12-11 11:33:45,630 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,630 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,630 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000 2020-12-11 11:33:45,630 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run 2020-12-11 11:33:45,630 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,630 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,630 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,630 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,641 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,641 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true' 2020-12-11 11:33:45,641 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000 2020-12-11 11:33:45,641 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run 2020-12-11 11:33:48,060 INFO o.a.j.e.ClientJMeterEngine: sent test to 192.168.1.135 basedir='.' 2020-12-11 11:33:48,060 INFO o.a.j.e.ClientJMeterEngine: Sending properties {} 2020-12-11 11:33:48,075 INFO o.a.j.e.ClientJMeterEngine: sent run command to 192.168.1.135 2020-12-11 11:33:48,075 INFO o.a.j.e.DistributedRunner: Remote engines have been started:[192.168.1.135] 2020-12-11 11:33:48,721 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, 192.168.1.135) 2020-12-11 11:35:49,030 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, 192.168.1.135)
      

      JMeter CLI interface:

      Creating summariser <summary> Created the tree successfully using fileExample.jmx Configuring remote engine: 192.168.1.135 Starting distributed test with remote engines: [192.168.1.135] @ Fri Dec 11 12:41:46 CET 2020 (1607686906826) Remote engines have been started:[192.168.1.135] Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445 summary =      0 in 00:00:00 = ******/s Avg:     0 Min: 9223372036854775807 Max: -9223372036854775808 Err:     0 (0.00%) Tidying up remote @ Fri Dec 11 12:43:51 CET 2020 (1607687031041) ... end of run
      

      Question:
      So the question is basically what can be wrong to make the server recognize the start calls, send the end signal, but don't write the .jtl file.

      posted in Performance
      Alberto
      Alberto
    • RE: How to find the Browser rendering time for API in jmeter overall response time?

      Not really, as per JMeter project main page:

      JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).

      The only way to measure browser rendering time is using a real browser, if you want to do this along with the existing JMeter performance tests - go for WebDriver Sampler, it provides JMeter integration with Selenium browser automation framework so you will be able to kick off a real browser and measure its rendering time (response time of the WebDriver Sampler will be the time from opening the page till the rendering finishes.

      If you need the breakdown - consider using Navigation Timing API

      posted in Performance
      Alberto
      Alberto
    • RE: Automated Unit Testing vs GUI Automation

      The purpose of the unit tests and GUI automated tests are different. The unit tests (usually implement by developers) should verify vary input and output of one function that under the test. It may be implemented with help the mock system if required. The unit tests usually run fast and all such suite haven't take more than 1 sec. The GUI test are simulated the user behaviour (we often call them end to end tests) and may take much more time for the execution.

      1. I wouldn't recommend write the unit tests with help of GUI automation because you want run them fast, rerun every time , be very stable and not be affected from other objects like browsers.
      2. It is much easy to write the automated tests using some automation recording however usually it is much less stable than code that you will write by yourself using the appropriated API.
      3. I am not sure that I follow you here but again the unit tests preferable write in code w/o GUI, the system test usually should be written with help GUI automation environment like Selenium.
      posted in Automated Testing
      Alberto
      Alberto
    • RE: Console output when running tests in CLion

      Catch2 tries to colorize the console and mistakenly thinks TestToolbar is a color-coded console. But you can help him - just add the parameter

      --use-color no
      

      If the parameter is difficult to write (I know CLion can be a little strange), then you can write CATCH_CONFIG_COLOR_NONE directly in tests

      posted in Automated Testing
      Alberto
      Alberto
    • Test for Django REST API framework

      There is my functional test

      from rest_framework import status
      from rest_framework.test import APITestCase
      
      __all__ = ['OAuthTestCase']
      
      ADDRESS_FOR_TEST = 'http://127.0.0.1:8000/api/v1/request/'
      
      
      class ApiOAuthTestCase (APITestCase):
      
           def setUp (self):
               User.objects.create_user (username = user_name, password = user_password)
      
               self.my_message = {
                   'grant_type': 'password',
                   'username': "user_name",
                   'password': "user_password",
                   'client_id': "secret_ket",
                   'client_secret': "clietn_id",
               }
      
           def test_token (self):
               response = self.client.post (ADDRESS_FOR_TEST, self.my_message)
               self.assertEqual (response.status_code, status.HTTP_201_CREATED)
      

      When passing this test, error 400 appears. Can you please tell me how to access the response content from response?

      posted in API Testing
      Alberto
      Alberto
    • How to distinguish an emulator from a physical device?

      I test Xamarin mobile applications for Android and iOS, tests are carried out both on real devices and on emulators.
      However, recently it became necessary to distinguish between a test run on an emulator and on a physical device.

      Question: Is there a way in the process of testing .apk or .ipa to understand where the application is running - on an emulator or on a real device?
      Are there any system parameters that always differ from the real device on the emulator?

      posted in Mobile Testing
      Alberto
      Alberto
    • RE: What tool do you use for Rest API testing?

      POSTMAN, Soap UI are the best

      posted in API Testing
      Alberto
      Alberto
    • 1 / 1