Skip to content

Conversation

@BarbaraKaraagac
Copy link

POM + first simple test

Copy link
Contributor

@PeggyBrown PeggyBrown left a 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"?>
Copy link
Contributor

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"?>
Copy link
Contributor

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"?>
Copy link
Contributor

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-->
Copy link
Contributor

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);
Copy link
Contributor

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");
Copy link
Contributor

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();
Copy link
Contributor

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() {
Copy link
Contributor

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();
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just logger?

@mfedkowicz
Copy link
Contributor

Two general comments:

  1. Please remove IDE specific files and target directory from repository (proper .gitignore should solve this)
  2. Please add some kind of instruction how to run these tests locally (prerequisites, where to download the drivers etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants