Mobile application development and testing tool Bugtags integration and use tutorial

Some time ago, many APPs suddenly became popular, but in the end they were all cherry blossoms. As an entrepreneurial team, it is a very rare opportunity to suddenly become popular. However, due to insufficient testing and the surge of users, problems such as APP crash and abnormal server data have been exposed, and the loss of users is inevitable.

Testing is an essential part of a successful app. If you rashly go online without sufficient testing, you will inevitably lose some users who could have become die-hard fans, and it will be very detrimental to the promotion of the APP.

Problems encountered in the
test What is the test for? Simply put, find fault! The bugs found in the test will be submitted to a task management system. After we solve the bug, we will close the bug in the task management system (always related to endless bugs). Some companies may not use the task management system and directly use Excel spreadsheets.

In this working mode, there are always some problems:

  • Excel is not good for bug management (it would be much more convenient to have a task management system)

  • After the bug is found in the test, you need to take a screenshot, send it to the computer, and then upload it to the task management system. This process is cumbersome.

  • Device information, app status, and the problem itself are hard to describe

  • Some bugs are hard to reproduce

  • Crash logs are hard to collect

I think many children's shoes have encountered these problems. Test submits a bug, and we can't reproduce it. If we can't reproduce it, we can't locate the problem (you can only continue to fight with the test: you have to reproduce the bug!). In order to solve these problems, today I recommend a test SDK - Bugtags.

Bugtags supports iOS and Android platforms, and I only introduce the iOS platform here.

For the convenience of testing, I have integrated Bugtags in iOSStrongDemo . Bugtags is indeed very convenient for testing. Next, I will briefly introduce Bugtags and Bugtags usage tutorial.

Introduction to Bugtags
According to the official website: Bugtags is a new generation of defect discovery and management tools designed for mobile testing. Committed to improving the testing process of mobile apps, connecting the user experience between defect discovery and defect submission, and improving the efficiency of testing and defect resolution. Improve your app anytime, anywhere.

Bugtags adopts the original in-app WYSIWYG problem reporting method, which effectively improves the efficiency of problem reporting and the accuracy of problem description; at the same time, the platform provides automatic collection and analysis of crash information and problem life cycle management functions.

Bugtags official website: https://bugtags.com/
Through a simple understanding, I feel that Bugtags should be a very good testing tool. If it is as easy to use as the official website introduces, it is really another great benefit for developers. Out of curiosity about new things and new technologies, I decided to give Bugtags a try.

Bugtags integration and use tutorial
Bugtags integration tutorial
I am integrating the SDK of Bugtags through CocoaPods, and the integration method is relatively simple. Specific steps are as follows:

1. Add the following code to your project's Podfile

1
pod  'Bugtags'

2. Execute the pod installation command

1
pod install

3. Import the header file in AppDelegate.m
001.png
4. Then add a line to the application:didFinishLaunchingWithOptions: method

1
[Bugtags startWithAppKey:@ "App Key"  invocationEvent:BTGInvocationEventBubble];

The APP KEY here is the app key obtained when you create an app after logging in to bugtags.com.

For detailed usage of CocoaPods, please visit: https://cocoapods.org/

Bugtags can also be manually integrated (it is recommended that you use CocoaPods to manage third-party libraries), the tutorial on manual integration can be clicked: http://help.bugtags.com/hc/

接入成功之后,APP上会悬浮一个小球。(还可以通过摇一摇呼出小球)

Bugtags使用教程
接下来,我通过提交一个bug和一个闪退日志来演示Bugtags使用方法。首先,我们看一下Bugtags的控制台。

QQ截图20150914102840.png

bug提交假设我们测试APP的时候,发现有一个title写错了。那么,通过Bugtags来提交这个bug。提交方法请看Gif图:

0 (1).gif

提交之后,刷新Bugtags控制台。这个时候,我们的控制台就多出了一个新建的bug:

400.png

点击可以查看bug详情,一起来看看是不是刚刚提交的bug:

401.png

果然是我们刚刚提交的bug。截图上有我们之前做的标记“Title error”,而且这里很清晰的记录了我们的设备信息。是不是感觉非常方便!

还可以查看用户操作的步骤。前面我们提到测试报上来的bug,很难复现。现在我们可以结合Bugtags的用户操作步骤快速复现Bug:

403.png

不止这些功能,还有用户数据、控制台日志以及Bugtags日志。更多功能大家自己接入SDK详细了解吧。

app闪退
我在导航栏的左侧按钮上绑定一个方法:

1
2
3
4
5
6
- (void)actionClick:(UIButton *)button
{
     NSArray *array = [NSArray arrayWithObjects:@ "1" , nil];
     NSString *string = [array objectAtIndex:2];
     NSLog(@ "%@" ,string);
}

这是一个数组越界的问题,数组越界可以导致APP直接闪退。下面我们看看Bugtags会不会记录这个闪退Bug。

0 (2).gif

提交之后,再次刷新Bugtags控制台,果然多了一个新建Bug:

404.png

为了测试Bugtags数据准确性,我分别用模拟器和真机来进行测试,一共点了五次。我们来看一下Bugtags记录的信息:

405.png

突然,觉得Bugtags确实很强大。有童鞋可能会担心,如果这个时候我没有联网怎么办呢。闪退信息还会被提交吗?这个不用担心,我已经测试过了,在你下次联网的时候Bugtags会提交之前的闪退信息的。

总结
下面是我对Bugtags试用过程,进行以下几点的总结:

  • 我接入的是Bugtags最新IOS版本库为IOS SDK1.0.4 集成过程简单方便。

  • Bugtags方便测试截图上传,还可以对截图进行标注。

  • Bugtags会记录设备信息、用户数据、用户步骤、控制台日志以及Bugtags日志。

  • Bugtags会自动提交闪退信息。

  • Bugtags可以设置Bug的优先级和Bug管理。

鸣谢
这篇教程诞生的不容易,在使用Bugtags的过程中,难免遇到一些问题。我都是直接跟Bugtags的技术人员何童鞋沟通的,非常感谢!希望这篇教程能够帮助大家快速的接入Bugtags测试工具,提供APP测试的效率。

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326718334&siteId=291194637