-
Notifications
You must be signed in to change notification settings - Fork 20
GUI Tests #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
GUI Tests #32
Conversation
PeggyBrown
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the Travis build green 😉
Also, maybe some .idea files should be ignored?
| @@ -0,0 +1,13 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file shouldn't be in repository, please update .gitignore
| @@ -0,0 +1,14 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
| @@ -0,0 +1,124 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
| <version>1.0.4</version> | ||
| </dependency> | ||
|
|
||
| <!--Poniżej biblioteki konieczne do poprawnego działania Allure framework--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use english comments here and in other places
| throw new RuntimeException("Cannot load properties due to IOException!"); | ||
| } finally { | ||
|
|
||
| closeResource(inputStream); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of manually closing the stream you could use try-with-resources statement:
https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html
| @Severity(SeverityLevel.MINOR) | ||
| @Description("The goal of this test is to check the correctness of a comment addition") | ||
| public void addComment() { | ||
| DriverUtils.navigateToPage("http://basia-komp:8000/#/conference/51"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic string, which will work only in your local environment. I suggest to get the base URL from properties, keep a list of constants for subpages and build full URLs from these two sources.
| DriverUtils.navigateToPage("http://basia-komp:8000/#/conference/51"); | ||
| //HomePage.goToConfitura2018(); | ||
|
|
||
| Confitura2018 loginPage = new Confitura2018(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it really loginPage? I mean I'm confused comparing the name of the class and the name of the argument.
| @Severity(SeverityLevel.CRITICAL) | ||
| @Description (".") | ||
|
|
||
| public void Import() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't get what this test does or check. Could you please explain?
| @BeforeMethod | ||
| public void beforeTest(@Optional BrowserType browserType) { | ||
| DriverManager.setWebDriver(browserType); | ||
| DriverManager.getWebDriver(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary line (or am I wrong?)
|
|
||
| public class TestBase { | ||
|
|
||
| private Logger logger1 = LogManager.getLogger(TestBase.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just logger?
|
Two general comments:
|
POM + first simple test