Charles: overview of built-in traffic proxying tools for mobile testing
The main situations and problems that inevitably arise during the work of testing engineers, which can be solved by using mobile applications in the Charles program. Conducting testing of mobile applications on iOS and Android operating systems.
Рубрика | Программирование, компьютеры и кибернетика |
Вид | статья |
Язык | английский |
Дата добавления | 08.12.2024 |
Размер файла | 661,7 K |
Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже
Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.
Размещено на http://www.allbest.ru/
National Research University Higher School of Economics
Charles: overview of built-in traffic proxying tools for mobile testing
Osina M.A.
Moscow, Russia
Abstract
The article provides an overview of the built-in tools for proxying traffic in mobile testing using Charles. The article also covers situations and problems that inevitably arise in testing engineers' daily routine, which can be solved by using the appropriate tools. This article is especially useful for professionals - practicing test engineers involved in testing mobile applications on iOS and Android.
Keywords: Charles, mobile testing, software testing, manual testing, proxying. mobile application operating testing
Аннотация
Осина М.А. бакалавр
Национальный исследовательский университет «Высшая школа экономики» (г. Москва, Россия)
CHARLES: ОБЗОР ВСТРОЕННЫХ ИНСТРУМЕНТОВ ПРОКСИРОВАНИЯ ТРАФИКА ПРИ ТЕСТИРОВАНИИ МОБИЛЬНЫХ ПРИЛОЖЕНИЙ
В статье приводится обзор встроенных инструментов для проксирования трафика при тестировании мобильных приложений в программе Charles. Также в статье приводятся ситуации и проблемы, неизбежно возникающие в процессе работы инженеров по тестированию, которые возможно решить путем использования соответствующих инструментов. Данная статья особо полезна в первую очередь профессионалам - практикующим инженерам по тестированию, занимающимся тестированием мобильных приложений на операционных системах iOS и Android.
Ключевые слова: Чарльз, мобильное тестирование, тестирование программного обеспечения, ручное тестирование, проксирование.
Nowadays there are a lot of technology solutions that allow proxying traffic for mobile testing. The most popular ones among technical specialists are Charles, Fiddler, Proxyman and others. However, there is not much research on the capabilities of these programs in the scientific community, which is why practicing test engineers cannot fully utilize the capabilities provided by programs for proxying HTTP and SSL / HTTPS traffic. One of the most popular programs on the market, Charles, provides ample functionalities for sniffing incoming and outgoing traffic on the device, as well as debugging.
The relevance of this article lies in the fact that there is almost no available information about the capabilities of Charles for mobile testing of applications on iOS and Android platforms in the scientific literature. The official website of the program [1] contains nothing but short text explanations about the purpose of the tools while there are no practical explanations, instructions and screenshots [2, p. 120-122]. In this article, I would like to highlight the current features of Charles presented in the latest version at the time of the publication of this article. This study will help both beginners and experienced specialists in the field of mobile testing to test the product for compliance with the requirements in the most effective and least time-consuming way.
Charles indeed provides many tools to use. To begin with, let's review those that allow to replace data - a request or a response.
Using the Rewrite tool, you can define sets of rules that will change the selected requests and responses from the Match section to those specified from the Replace section. When creating a rule, the following types of rewrite are available: Add Header, Modify Header, Remove Header, Host, Path, URL, Add Query Param, Modify Query Param, Remove Query Param, Response Status, Body.
Let's see an example where such a feature can be useful to a specialist in the field of mobile testing. We have a certain screen of the application where we want to check that all elements are displayed correctly on the screen. Assuming that the user cannot change the playlist title manually (pic. 1), we need to rewrite data for testing.
Pic. 1. Elements on the screen before using Rewrite tool
In Charles menu, open the Tools - Rewrite section. On Rewrite Settings screen, Enable Rewrite and add a new rule with type Body. On this screen, we need to check that the long title is truncated and displayed correctly on the screen. In Match section, in Value field we replace the parameter "name":"Testplaylist" to a new test parameter "name":"Very very long name on test playlist on the screeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeen" in Replace section (pic. 2). Now we need to save and enable this rule.
Pic. 2. Adding new Rewrite rule
Now we need to do a pull to refresh on a mobile device or reopen the required screen. The "name" parameter now comes with a new test value, and it is possible to check that elements on the screen are displayed correctly. A comparison of the results before and after replacing with Rewrite is displayed below (pic. 3). A new title with a large number of characters is displayed correctly, so the task of the test engineer is completed.
Pic. 3. Elements on the screen before and after applying Rewrite tool
Map Remote and Map Local are the two tools that allow us to do the same thing but in different ways. The purpose of these tools is to map the desired server response on the go, while Map Remote (pic. 4) takes the response from another server (this is convenient if a server response is provided for testing on the test domain). This response replaces the actual server response, so it is possible to mock the behavior that is being tested and to verify that the client behavior is correct.
At the same time Map Local (pic. 5) allows us to take a replacement response from a locally stored file. The result of using it will be the same - the response of the server, where the client sends requests, will be replaced with a local file, so it is possible to test the new behavior on the client.
Pic. 4. Example of setting Map Remote
Pic. 5. Example of setting Map Local
To make sure that Map Local or Map Remote settings are enabled or disabled, we need to open the Tools tab in the menu bar and pay attention to whether the corresponding menu items are checked. When work with replacement data is completed, it is necessary to turn off the settings so that real server responses are being received from the corresponding endpoint.
The next settings that are useful for a test engineer are Block List and Allow List. Their purpose is easy to explain with the help of each other - if we set some endpoints in the Block List, requests to the corresponding endpoints will not pass, while with the same endpoints in the Allow List will only be allowed. This is a useful tool for a test engineer as it allows us to evaluate the behavior of a mobile application in case of a failure of certain backend services on which the client depends. Various corner cases and even application crashes are identified with the help of this tool.
One of the other test engineers' favorite features is Breakpoint Settings - this tool allows us to set the locations where Charles will stop sending a request or receiving a response and allows us to edit the request or response on the fly. Based on the given task, this tool can be much more flexible and convenient than Rewrite - in Rewrite we need to preset what needs to be rewritten and replaced; breakpoints, on the other hand, make it possible to edit the request and response on the fly, getting the result of such manipulations right away.
Another essential tool for a test engineer is Compose. Thanks to it, it is possible to edit a request which was already sent to the server, send it again and get a new response from the server. Let's imagine the situation - UI functionality on the client is not fully implemented, so there is no way to send any kind of request from the client, so we have to send a replacement request through Charles. If an incorrect request was initially made and an unexpected response was received, instead of resending the same request again, we can simply edit the previously sent one and get the correct response [3]. Such fixed requests have a pencil icon in the list of requests.
A useful tool for mobile applications testing in Charles is Repeat. It allows us to send the same request again. A similar tool is Advanced Repeat. With its help we can set a certain number of times to send the required request to the server (pic. 6).
Pic. 6. Example of setting Advanced Repeat
This may be helpful in the case when it is necessary to test the flood control in the application. For example, after sending the same request 10 times, we can see a similar screen in the application (pic. 7). This ensures that such type of frequent requests to the backend will be filtered to prevent DDoS attacks or unauthorized use of the API (for example, by bots).
Pic. 7. Example of captcha after reaching flood control limit
Finally, another important tool for a test engineer on iOS and Android is Throttling. We can configure its settings in the section Proxy -- Throttle Settings. The following parameters settings are available: Bandwidth (kbps), Utilisation (%), Round- trip latency (ms), MTU (bytes), Reliability (%), Stability (%), Unstable quality range (%). There are also ready presets to mock 56 kbps Modem, 256 kbps ISDN/DSL, 512 kbps ISDN/DSL, 2 Mbps ADSL, 8 Mbps ADSL2, 16 Mbps ADSL2+, 32 Mbps VDSL, 32 Mbps Fibre, 100 Mbps Fibre, 3G, 4G (pic. 8).
We will need this tool to simulate a specific network connection or check test cases with no connection on a mobile device. For example, to make sure that the UI skeleton of the application is displayed with a bad connection, and if there is no network, a placeholder appears to inform about a network error as a result.
In conclusion we can state that Charles provides a wide range of functionalities for industry professionals and experts in testing applications on Android and iOS. The functionality of this program provides tools for sniffing and analyzing the traffic, replacing requests and responses, resending required requests and mocking a specific network connection, which is essential when solving practical problems and performing functional testing of the application. These professional solutions make the work of beginners and experienced mobile testers much easier and more efficient.
Pic. 8. Example of setting Throttling preset
References
1. How to tame Charles Proxy? Habr.com [Electronic resource]
2. Kadyrov K. A., Safin A. M. COMPARISON OF CHARLES PROXY AND FIDDLER TRAFFIC INTERCEPTION AND ANALYSIS TOOLS //DEVELOPMENT OF MODERN SCIENCE AND EDUCATION: CURRENT ISSUES, ACHIEVEMENTS AND INNOVATIONS. - 2022. - P. 120-122.
3. Welcome. Charles Web Debugging Proxy Application [Electronic resource]
Размещено на Allbest.ru
...Подобные документы
Изучение общих понятий операционной системы Android, разработанной для коммуникаторов, планшетных компьютеров, основанной на ядре Linux. Разработка программного обеспечения Android. Преимущества и недостатки мобильной операционной системы Windows Mobile.
реферат [60,6 K], добавлен 16.04.2012Social network theory and network effect. Six degrees of separation. Three degrees of influence. Habit-forming mobile products. Geo-targeting trend technology. Concept of the financial bubble. Quantitative research method, qualitative research.
дипломная работа [3,0 M], добавлен 30.12.2015Technical methods of supporting. Analysis of airplane accidents. Growth in air traffic. Drop in aircraft accident rates. Causes of accidents. Dispatcher action scripts for emergency situations. Practical implementation of the interface training program.
курсовая работа [334,7 K], добавлен 19.04.2016Архитектура операционной системы Android. Инструменты Android-разработчика. Установка Java Development Kit, Eclipse IDE, Android SDK. Настройка Android Development Tools. Разработка программы для работы с документами и для осуществления оперативной связи.
курсовая работа [2,0 M], добавлен 19.10.2014Структура освіти і функції її органів. Сутність, передумови та переваги розвитку дистанційного навчання. Системи комп’ютерного тестування, що використовуються в навчальному процесі: MyTestX, Testing, TestMaker, EasyQuizzy, Айрен. Процес створення тестів.
курсовая работа [2,9 M], добавлен 03.02.2014Написание тестирующей программы для проверки знаний учащихся с помощью языка программирования Visual Basic for Applications (VBA), встроенного в пакет Microsoft Office. Общие сведения о программе, условия ее выполнения, настройка, проверка, выполнение.
контрольная работа [25,2 K], добавлен 07.06.2010Функции и основная роль коммерческого банка. Особенности кредитных и депозитных операций. Описание среды программирования и сущность Visual Basic for Applications (VBA). Схема алгоритма программы, процедура сохранения файла и выхода из программы.
курсовая работа [1,9 M], добавлен 04.04.2012Сумма двух разреженных полиномов, заданных ненулевыми коэффициентами и их номерами. Разработка программ на языке программирования Visual Basic for Applications. Вывод справочной информации. Операционная система Windows. Хранение двоичных данных.
научная работа [390,2 K], добавлен 09.03.2009Рождение и развитие Basic. Краткое описание Visual Basic for Applications. Новые возможности Visual Basic 5.0. Пример взаимодействия Excel и Visual Basic. Программирование табличных функций. Встраивание, применение функций. Формы, средства управления OLE.
реферат [20,7 K], добавлен 11.03.2010Актуальный статус социальных сетей: их понятие и внутренняя структура, история становления и развития, целевая аудитория, классификация и разновидности, позиция организаций. Анализ деятельности музыкальной группы "Perpetum Mobile" в социальных сетях.
курсовая работа [1,6 M], добавлен 17.06.2013Теория тестирования. Тест как система заданий и его эффективности. Качество тестовых заданий. Проверка качества тестовых заданий. Матрица результатов. Современный подход к понятию "трудность". Visual Basic for Applications (VBA). Объектные модели.
дипломная работа [198,9 K], добавлен 10.11.2008Новейшие информационные технологии, представленные на Всемирном конгрессе в Барселоне- Mobile World Congress 2011. Современная организационно-правовая защита информации. Методологические основы и научно-методологический базис информационной безопасности.
контрольная работа [29,7 K], добавлен 21.12.2011Обзор современных систем беспроводного абонентского доступа. Особенности применения модемов OFDM и многостанционного доступа OFDMA. Разработка информационной сети на основе технологии Mobile WiMAX, оценка экономической эффективности ее внедрения.
дипломная работа [5,4 M], добавлен 12.07.2010Назначение и основные функции Ехсе1. Причины возникновения ошибок и способы их решения в Ехсе1. Язык программирования Visual Basic for Applications (VBA): общая характеристика языка. Основные понятия информационной безопасности, способы ее нарушения.
шпаргалка [201,2 K], добавлен 26.02.2010Особенности разработки модуля взаимодействия и приложений для мобильных устройств на базе Windows Mobile. Основные компоненты системы. Выбор протокола XMPP. Создание базы данных, тестирование и отладка системы. Программа, моделирующая аварийные ситуации.
курсовая работа [1,2 M], добавлен 05.11.2012Возникновение и развитие персональных компьютеров. Отличительные особенности и классификация ПК. Модели и сферы применения. Consumer PC (массовый ПК). Office PC (деловой ПК). Mobile PC (портативный ПК). Workstation PC (рабочая станция). Новые виды ПК.
контрольная работа [29,5 K], добавлен 24.09.2008Построение абстрактной модели. Структура базового класса System_Term: формальное описание класса, структура данных и функций, инструкция программиста и пользователя. Структура базовых классов mobile, Home, TV, Internet, их составные части и функционал.
курсовая работа [1,2 M], добавлен 20.06.2014Создание логической структуры сети. Разработка информационной структуры предприятия. Выбор сетевых технологий и протоколов. Планирование IP-адресаций. Разработка структурированной кабельной системы. Определение физической структуры сети, ее спецификация.
курсовая работа [1,5 M], добавлен 28.01.2015Процессоры Duron на ядре Spitfire (Model 3), Morgan (Model 7), Applebred (Model 8), Mobile Duron Camaro. Схема материнской платы EP-8KHAL+. Микросхема "Северный мост". Звуковой чип ALC201A. Конфигурация системной памяти. Регулятор заглушки шины RT9173.
курсовая работа [3,6 M], добавлен 26.03.2013Знакомство с проблемами обнаружения вредоносного программного обеспечения для мобильных устройств. Анализ функций антивирусного пакета Kaspersky Mobile Security 8.0. Характеристика наиболее распространенных антивирусных программ для мобильных устройств.
реферат [55,1 K], добавлен 11.01.2017