Test Library-based UI component library test method, storage medium and electronic equipment

The invention relates to the technical field of front-end code testing, solves the problems of high testing difficulty and low efficiency of a UI component library in the prior art, and discloses a testing Library-based UI component library testing method, a storage medium and electronic equipment,...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: WANG XIONGHUI, LIU TINGJIE, ZHAO ZHANGWAN
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention relates to the technical field of front-end code testing, solves the problems of high testing difficulty and low efficiency of a UI component library in the prior art, and discloses a testing Library-based UI component library testing method, a storage medium and electronic equipment, the method comprises the following steps: carrying out global configuration on a to-be-tested UI component library; extracting a query method of component key DOM nodes in the UI component library to be tested and a user event interaction method, and compiling corresponding test cases; generating a JSDoc document according to the test case; the query method and the user event interaction method are introduced into a web project, sample codes are provided for a user, repeated codes can be reduced, a developer can check how to query the elements and how to trigger the user event without browsing a source code, and in addition, the efficiency of the user event interaction is improved. The use mode and the basic test c