Mailingliste - Einträge 2014
Die Mailingliste ist seit Juli 2022 geschlossen, dient aber weiterhin als Informationsarchiv zu QF-Test.
Wenn Sie aber über Neuerungen zu QF-Test informiert bleiben wollen, können Sie einfach unseren
Newsletter abonnieren
Um aktuell die Informationen zu jeder Release - auch Minor Releases - zu bekommen, können Sie den
RSS-Feed abonnieren oder uns in sozialen Medien folgen.
Alternativ bietet QF-Test auch selbst eine Versionsinformation an.
Eine weitere Informationsquelle ist unser Blog, in dem es aktuelle Beiträge zu allgemeinen Themen, zur Firma QFS und auch diverse "How-Tos" gibt:
Blog abonnieren
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [QF-Test] Extracting/checking text from JEditorPane
I have a problem checking the displayed text in a swing JEditorPane component. The HTML text is generated by my SUT code in one go, then submitted to the component, and looks like this: <html> <head> </head> <body> <h2> Minimum Report Detail <a href="" size="small">show help info...</font></a> </h2> <table id="detail" rules="cols"> <tr id="normalrow" currentrow="0"> <td id="label" border="1" cellspacing="0" align="left"> </td> <td id="value" border="1" cellspacing="0" align="right"> Raw </td> <td id="value" border="1" cellspacing="0" align="right"> Calibrated </td> <td id="value" border="1" cellspacing="0" align="right"> Unit </td> </tr> and so on... This (expected) text has been put into the “expected text” field of a Check-txt node in my test, by way of the check recording feature of qft (this is exactly how the text looks in a debugger prior to throwing it at JEditorPane). But when the test runs
and the check is executed, it fails, and the following actual text is displayed: <html> <head> </head> <body> <h2> Minimum Report Detail <font size="small"><a href="" help info...</a></font> </h2> <table id="detail" rules="cols"> <tr currentrow="0" id="normalrow"> <td border="1" cellspacing="0" align="left" id="label"> </td> <td border="1" cellspacing="0" align="right" id="value"> Raw </td> <td border="1" cellspacing="0" align="right" id="value"> Calibrated </td> <td border="1" cellspacing="0" align="right" id="value"> Unit </td> </tr> As you can see, the position of the id attribute has changed, although not in all cases. Also the relative order of the a and the font element have changed. Of course with this text, the test fails. But it also sometimes occurs that the text is extracted unaltered. Component identification is never an issue. Strange, isn’t it? I also noticed that qftest becomes VERY slow when a check_txt contains a large text field with many line breaks. Maybe qftest has to employ special logic to retrieve the HTML from the component. The normal copy-to-clipboard handler e.g. only retrieves the plain text and strips any tags. Have I spotted a bug? Is this non-deterministic behaviour of JEditorPane (or
it’s instrumentation by qftest) or of qftest? Another solution for me would be to retrieve the plain text from the contents of JEditorPane and base the comparison on that. Is that supported by qftest in any way? I am currently using qftest-3.5.6 for evaluation. Thanks for any help, Michael --------------------------------------------------------------------------------- Michael Theurich Monitoring Application Tools SW Engineer Telespazio VEGA Deutschland GmbH Provision of Engineering Support Services EUMETSAT Eumetsat-Allee 1 64295 Darmstadt Tel +49 6151 807-7530
|
Wir verwenden Cookies zur anonymisierten Auswertung Ihres Besuchs auf unserer Webseite durch »Matomo«. Dafür benötigen wir Ihr Einverständnis, welches für zwölf Monate gilt. Ein Widerruf bzw. Opt-out ist jederzeit auf unser Datenschutz-Seite möglich.
1. Funktionale Cookies
Wir verwenden funktionale Cookies, um die Basisfunktionalität der Webseite zu gewährleisten.
2. Performance und Statistik Cookies
Wir verwenden Matomo zur Analyse und Optimierung unserer Webseite. Cookies erlauben eine anonyme Erfassung der Informationen und helfen uns, Ihnen einen benutzerfreundlichen Besuch unserer Webseite zu bieten.
Dieses Cookie enthält eine eindeutige jedoch pseudonymisierte Matomo-interne Besucher-ID zur Erkennung wiederkehrender Besucher.
Dieses Cookie wird verwendet, um zu tracken, von welcher Website der anonymisierte Benutzer auf die Website gekommen ist.
Das Session Cookie von Matomo wird verwendet, um die Seitenanforderungen des Besuchers während der Sitzung zu verfolgen.
wird erzeugt und versucht sofort wieder zu löschen (zur Prüfung, ob der Browser des Besuchers Cookies unterstützt).
Kurzzeit-Cookies für temporäre Besuchsdatenspeicherung.
Kurzzeit-Cookies für temporäre Besuchsdatenspeicherung.