The present invention provides a method, apparatus, electronic device and storage medium for
user interface testing of components. The method includes: obtaining a plurality of comparison test cases based on a comparison component
library, and obtaining a plurality of benchmark test cases based on a benchmark component
library; obtaining comparison combined components based on the comparison component
library through
composite pattern abstraction and permutation and combination of component elements, and obtaining benchmark combined components based on the benchmark component library; obtaining comparison
combined test cases based on the comparison combined components, and obtaining benchmark
combined test cases based on the benchmark combined components; performing
user interface testing on the comparison component elements in the comparison component library based on the comparison test cases and the benchmark test cases, as well as the comparison
combined test cases and the benchmark combined test cases, to obtain test results. By combining component elements and performing UI testing on the combined components in combination with the component elements, the present invention can quickly locate single-component errors with higher accuracy.