WebFixture can now read external browserSetup files#83
Open
kbayraktar wants to merge 2 commits intomasterfrom
Open
WebFixture can now read external browserSetup files#83kbayraktar wants to merge 2 commits intomasterfrom
kbayraktar wants to merge 2 commits intomasterfrom
Conversation
gunther-bachmann
requested changes
Nov 15, 2018
| // First try to resolve the file through environment variable | ||
| result = getResourceOverEnvironmentVariable(browserSetupFilePath); | ||
| if (StringUtils.isNotBlank(result)) { | ||
| logger.debug("Browser capabilities read from file : {}", browserSetupFilePath); |
| result = CharStreams.toString(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); | ||
|
|
||
| } catch (IOException e) { | ||
| logger.info("The file with the name {} can not be read in the resource folder." |
Member
There was a problem hiding this comment.
trace and then (re)throw the exception. the caller should then wrap this in a fixture exception
| // throw new FixtureException("file could not be found in resource folder", | ||
| // FixtureException.keyValues("fileName", fileName)); | ||
| } catch (NullPointerException e) { | ||
| logger.error("The file with the name {} can not be found in the resource folder.", fileName); |
Member
There was a problem hiding this comment.
trace and then (re)throw the exception. the caller should then wrap this in a fixture exception
| /** | ||
| * For reading content of a JSON-File where the path is defined through the environment variable | ||
| * <code>TEST_EDITOR_BROWSER_SETUP_PATH</code>.<br> | ||
| * Usage under Linux : Set TEST_EDITOR_BROWSER_SETUP_PATH=~/your_prefered_folder/fileName.json |
| if (StringUtils.isNotBlank(path)) { | ||
| fileContent = FileUtils.readFileToString(new File(path), StandardCharsets.UTF_8); | ||
| } else { | ||
| logger.debug("Can not find environment variable '{}' with path entry for browser " |
|
|
||
| } | ||
|
|
||
| private void getBrowserSetupFile() throws FixtureException, IOException { |
Member
There was a problem hiding this comment.
split test in two parts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.