IP Library Granted Patent US 12,321,254
Granted Patent B2
US 12,321,254 · App. 17/435,506 · Granted Jun 3, 2025

Internationalization of automated test scripts

Inventors: Er-Xin Shang (Shanghai, CN); Qian-Ru Zhai (Shanghai, CN); Hao-Bin Cui (Shanghai, CN)
Assignee: Micro Focus LLC
G06F11/3684G06F9/454G06V10/20G06V10/40G06V30/10
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,321,254
App. No.
17/435,506
Granted
Jun 3, 2025
Kind
B2
Abstract

According to examples, an apparatus may include a processor that may internationalize an automated test script that was generated to test a Graphical User Interface (GUI) in the first human language. When the GUI is internationalized into a second human language, the automated test script may no longer function. As such, the system may employ computer vision techniques to analyze the GUI in the first human language and the GUI in the second human language to identify text and GUI elements that correlate with one another. Based on the correlation, the system may internationalize the automated test script to function on the GUI in the second human language.

Claims (76)

1. A method comprising:

recording a test of a graphical user interface (GUI), wherein the GUI includes a user interface (UI) element, the UI element comprising an image feature and first text in a first human language;

obtaining an image of the GUI based on the recorded test;

locating the first text in the image of the GUI;

processing the image to remove the first text;

detecting the image feature of the UI element based on the removal of the first text, wherein the detected image feature is to be used to identify the UI element in the GUI;

generating an automated test script in the first human language based on the recorded test, information relating to the first text, and the image feature, wherein the automated test script is internationalized into a second human language;

obtaining a second image of a second version of the GUI, the second image comprising the second text in the second human language;

determining a distance between a first word or phrase in a second text and a second word or phrase in the second text;

grouping the first word or phrase into a first group and the second word or phrase into a second group based on the determined distance; and

comparing a first translation of the first group with the first text and a second translation of the second group with the first text to determine which one of the first group or the second group corresponds to the first text.

2. The method of claim 1 , further comprising:

detecting a text boundary of the first text, wherein the first text is removed from the UI element based on the detected text boundary.

3. The method of claim 1 , further comprising:

generating a second version of the automated test script to automatically test the second version of the GUI in the second human language.

4. The method of claim 3 , wherein

identifying the UI element in the second version of the GUI responsive to a determination that the translated second text corresponds to the first text.

5. The method of claim 4 , further comprising:

replaying the second version of the automated test script on the second version of the GUI, wherein the replay includes execution of a user interaction with the identified UI element in the second version of the GUI.

6. The method of claim 4 , further comprising:

providing the first text as a first input to a natural language processor; and

obtaining a first output from the natural language processor, the first output including a first meaning of the first text, wherein the information relating to the first text comprises the first output;

wherein determining whether the translated second text corresponds to the first text, further comprises:

providing the translated second text as a second input to the natural language processor;

obtaining a second output from the natural language processor, the second output including a second meaning of the second text; and

comparing the first meaning with the second meaning.

7. The method of claim 1 , wherein identifying the first text further comprises performing optical character recognition on the image of the GUI.

8. The method of claim 1 , further comprising:

determining that the second UI element has no text; and

detecting the second image feature of the second UI element without text removal from the second image, wherein the detected second image feature is to be used to identify the second UI element in the GUI.

9. The method of claim 1 , wherein the second human language comprises a different character set compared to the first human language.

10. An apparatus comprising:

a processor; and

a non-transitory computer readable medium on which is stored instructions that, when executed by the processor, cause the processor to:

record a test of a graphical user interface (GUI), wherein the GUI includes a user interface (UI) element, the UI element comprising an image feature and first text in a first human language;

obtain an image of the GUI based on the recorded test;

locate the first text in the image of the GUI;

process the image to remove the first text;

detect the image feature of the UI element based on the removal of the first text, wherein the detected image feature is to be used to identify the UI element in the GUI;

generate an automated test script in the first human language based on the recorded test, information relating to the first text, and the image feature, wherein the automated test script is internationalized into a second human language;

obtain a second image of a second version of the GUI, the second image comprising the second text in the second human language;

determine a distance between a first word or phrase in the second text and a second word or phrase in the second text;

group the first word or phrase into a first group and the second word or phrase into a second group based on the determined distance; and

compare a first translation of the first group with the first text and a second translation of the second group with the first text to determine which one of the first group or the second group corresponds to the first text.

11. The apparatus of claim 10 , wherein the instructions that, when executed by the processor, further cause the processor to:

detect a text boundary of the first text, wherein the first text is removed from the UI element based on the detected text boundary.

12. The apparatus of claim 10 , wherein the instructions further cause the processor to:

generate a second version of the automated test script to automatically test the second version of the GUI in the second human language.

13. The apparatus of claim 12 , wherein the instructions further cause the processor to:

identify the UI element in the second version of the GUI responsive to a determination that the translated second text corresponds to the first text.

14. The apparatus of claim 13 , wherein the instructions further cause the processor to:

replay the second version of the automated test script on the second version of the GUI, wherein the replay includes execution of a user interaction with the identified UI element in the second version of the GUI.

15. The apparatus of claim 13 , wherein the instructions are further to cause the processor to:

provide the first text as a first input to a natural language processor; and

obtain a first output from the natural language processor, the first output including a first meaning of the first text, wherein the information relating to the first text comprises the first output;

wherein to determine whether the translated second text corresponds to the first text, the instructions are further to cause the processor to:

provide the translated second text as a second input to the natural language processor;

obtain a second output from the natural language processor, the second output including a second meaning of the second text; and

compare the first meaning with the second meaning.

16. The apparatus of claim 10 , wherein to identify the first text, the instructions are further to cause the processor to:

perform optical character recognition on the image of the GUI.

17. The apparatus of claim 10 , wherein the instructions are further to cause the processor to:

determine that a second UI element has no text; and

detect a second image feature of the second UI element without text removal from the second image, wherein the detected second image feature is to be used to identify the second UI element in the GUI.

18. The apparatus of claim 10 , wherein the second human language comprises a different character set compared to the first human language.

19. A non-transitory computer readable medium comprising instructions that, when read by a machine, cause the machine to perform:

recording a test of a graphical user interface (GUI), wherein the GUI includes a user interface (UI) element, the UI element comprising an image feature and first text in a first human language;

obtaining an image of the GUI based on the recorded test;

locating the first text in the image of the GUI;

processing the image to remove the first text;

detecting the image feature of the UI element based on the removal of the first text, wherein the detected image feature is to be used to identify the UI element in the GUI;

generating an automated test script in the first human language based on the recorded test, information relating to the first text, and the image feature, wherein the automated test script is internationalized into a second human language;

obtaining a second image of a second version of the GUI, the second image comprising the second text in the second human language

determining a distance between a first word or phrase in a second text and a second word or phrase in the second text;

grouping the first word or phrase into a first group and the second word or phrase into a second group based on the determined distance; and

comparing a first translation of the first group with the first text and a second translation of the second group with the first text to determine which one of the first group or the second group corresponds to the first text.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 28, 2021
From: SHANG, ERXIN; ZHAI, QIAN-RU; CUI, HAO-BIN
To: ENTIT SOFTWARE LLC
Reel/Frame 057953/0659 →
CHANGE OF NAME Recorded Oct 28, 2021
From: ENTIT SOFTWARE LLC
To: MICRO FOCUS LLC
Reel/Frame 057969/0175 →
Continuity (1)
Related Publication 20220138088A1 · May 5, 2022
References Cited (23)
US 8527950B2 · Berry · 2013 [cited by examiner]
US 8875103B2 · Yun · 2014 [cited by examiner]
US 8938383B2 · Ding et al. · 2015 [cited by applicant]
US 9189135B2 · Chaturvedi · 2015 [cited by applicant]
US 10489126B2 · Kumar · 2019 [cited by examiner]
US 10832012B2 · Nomura · 2020 [cited by examiner]
US 20080115111A1 · Chang · 2008 [cited by applicant]
US 20100042929A1 · Berry · 2010 [cited by examiner]
US 20110283261A1 · Yun · 2011 [cited by examiner]
US 20180173614A1 · Gong · 2018 [cited by examiner]
US 20180189170A1 · Dwarakanath et al. · 2018 [cited by applicant]
US 20190018842A1 · Nomura · 2019 [cited by examiner]
US 20190250891A1 · Kumar · 2019 [cited by examiner]
CN 102411538A · 2012 [cited by applicant]
CN 102567201A · 2012 [cited by applicant]
CN 103136094B · 2016 [cited by applicant]
CN 106294178A · 2017 [cited by applicant]
WO WOWO2015165078A1 · 2015 [cited by applicant]
“Localization, Globalization & Linguistic Testing Services,” QA InfoTech, 2018, 4 pages [retrieved online from: qainfotech.com/globalization-testing-services.html]. [cited by applicant]
Jonasson “The Automation of Globalization UI Testing,” Globalization and Localization Association, Oct. 18, 2016, 8 pages [retrieved online from: www.gala-global.org/blog/automation-globalization-ui-testing]. [cited by applicant]
Nangwaria “An Introduction to Localized Testing,” 3Pillar Global, Inc., 2016, 8 pages [retrieved online from: www.3pillarglobal.com/insights/an-introduction-to-localized-testing]. [cited by applicant]
Wang et al. “Multilingual Automation Testing Solution,” IBM, Feb. 26, 2013, 12 pages [retrieved online from: www.ibm.com/developerworks/rational/library/multilingual-automation-testing-solution/index.html ]. [cited by applicant]
International Search Report and Written Opinion prepared by the ISA/CN on Nov. 20, 2019, for International Application No. PCT/CN2019/077496. [cited by applicant]