The fundebug.test() method was added in 0.2.0.

Fundebug provides professional Alipay small program BUG monitoring service, which can catch anomalies, errors or bugs of small programs in the living environment for you in the first time, and send alarms to developers in time to help you quickly fix bugs. We welcome your free trial, and also welcome your feedback or questions.

test(name, message)

Fundebug.test () is used for testing, and you can send test data to Fundebug and receive an alarm email.

  • Name: Error name, parameter type string, default value “Test”
  • Message: error message. The parameter type is a string. The default value is “Hello, Fundebug!”.

Example:

fundebug.test()
Copy the code
fundebug.test("Test"."Hello, Fundebug!")
Copy the code

Fundebug.test () is mainly used for testing, and it sends an error message every time (the limit is 20 per day), which can cause you trouble. To avoid repeated alarms, use other apis to log errors, so that the same error will only reach a threshold of errors (10, 100, 100…). Call the police.

  • notify
  • notifyError

Page

The Fundebug plugin calls the getCurrentPages method to get the Page data of the error Page and report it with the error data:

{
    "route": "pages/index/index"."_viewId": "1556021552987"."data": {
        "title": "Alipay"}}Copy the code

If you do not need to collect Page data, you can set the silentPage attribute to true:

fundebug.init(
{
    silentPage : true
})
Copy the code

Finally, thanks to Fundebug user Pangpang Min for his feedback.

reference

  • Fundebug document – fundebug.test()
  • Fundebug document – silentPage

About Fundebug

Fundebug focuses on real-time BUG monitoring for JavaScript, wechat applets, wechat games, Alipay applets, React Native, Node.js and Java online applications. Since its launch on November 11, 2016, Fundebug has handled more than 1 billion error events in total, and paid customers include Google, 360, Kingsoft, Minming.com and many other brands. Welcome to try it for free!

Copyright statement

Reprint please indicate the author Fundebug and this article addresses: blog.fundebug.com/2019/04/25/…