Creation – Day One (evening)
by Dima

If you have following values set in

	public static final Boolean LOG_INFOS = true;
	public static final Boolean LOG_VERBOSE = true;

, practically any action performed by tests will be reflected in logs.

Some examples.

11:25:12,156 INFO pool-1-thread-1 utils:info:? – (V)Tab opening started
11:25:13,453 INFO pool-1-thread-1 utils:info:? – (V)Tab opened: title is Employment Websites: Home ~ Salesforce – Developer Edition

OpenTab method informs us – started, tab was opened and refers to its Title.

11:25:14,593 INFO pool-1-thread-1 utils:info:? – (V)Filling Element _Employment Website Name_ by valid value = _websitePage00001_
11:25:14,609 INFO pool-1-thread-1 utils:info:? – (V)Filling Element _Web Address_ by valid value = _1_
11:25:14,640 INFO pool-1-thread-1 utils:info:? – (V)Filling Element _Price Per Post_ by valid value = _1_
11:25:14,656 INFO pool-1-thread-1 utils:info:? – (V)Filling Element _Maximum Budget_ by valid value = _1_
11:25:14,687 INFO pool-1-thread-1 utils:info:? – (V)Pressing button with locator _save_ started
11:25:16,578 INFO pool-1-thread-1 utils:info:? – Pressed button with locator _save_ (OK)
11:25:16,687 INFO pool-1-thread-1 utils:info:? – After save title of page _Employment Websites_ is _Employment Website: websitePage00001 ~ Salesforce – Developer Edition (OK)

Filled all four elements with KGV, pressed button Save (successfully –i.e. Selenium did not generate any exceptions), and compared Title with expected value. All fine (OK) with Title too.

11:28:45,187 ERROR pool-1-thread-1 utils:error:? – !!!— Value _78.7 _ for element _Maximum Budget_ is displayed as _$78.70_ (should be _$78.7_)(ERROR) —!!!

After entered value was saved it is shown not in a way we expected it to see (for this particular situation – this version of code does not take in account nuances of fractional part presentation in Currency element).

11:26:25,015 ERROR pool-1-thread-1 utils:error:? – !!!— Value _test••ar_ for element _Web Address_ is displayed as _Bearoff_ (should be _http://test••ar_)(ERROR) —!!!

Here, mystically, value “test••ar” becomes в “Bearoff”. :)
In reality this version of tests gets mixed up with locators for fields containing URL’s. We still have a lot to work on!

For your convenience we uploaded logs produced by code we discussed in “Day 1″ series of posts here.
You can also grab them all in a single archive.

Some thoughts about version 54:

1) we have no fatal errors – no matter what happened tests do continue rolling new errors as a snow ball;
2) logging – we have all information in logs but in a very raw form which is hard to process further;
3) it is possible to get lost in a code jungles – comment it;
4) we did not use a possibility to run tests in parallel – this is because we have only one test (Employment Web Site).

Print this post | Home

Comments are closed.