Skip to content

Conversation

@titusfortner
Copy link

  1. The package names shouldn't include test.java. (IntelliJ might have the wrong folder set as Test Source)
  2. Needs to be MyTestWatcher instead of SauceTestWatcher because it has to handle both local & sauce use cases
  3. I just found out that the advantage to this being an inner class is you don't have to set the values for the class to recognize the field values of the outer class!
  4. We still need to use RegisterExtension even though the instance isn't actually used; code complains with ExtendWith probably because we are annotating the outer class and it doesn't like that
  5. No AfterEach when using a TestWatcher
  6. I put the System Property toggle in a static BeforeAll hook so people know it is special and isn't what you actually want in your project. Just a suggestion; feel free to put it back.

@@ -1,4 +1,4 @@
package test.java.com.saucelabs.advancedselenium;
package com.saucelabs.advancedselenium;
Copy link
Owner

Choose a reason for hiding this comment

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

With the way the tests is set up, based on this: https://github.com/saucelabs-training/advanced-selenium/tree/new_base repo, the tests won't work unless they are named as they were before

@@ -1,70 +1,72 @@
package test.java.com.saucelabs.advancedselenium;
package com.saucelabs.advancedselenium;
Copy link
Owner

Choose a reason for hiding this comment

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

With the way the tests is set up, based on this: https://github.com/saucelabs-training/advanced-selenium/tree/new_base repo, the tests won't work unless they are named as they were before

@Override
protected void testSuccessful(ExtensionContext context) {
session.stop(true);
public void testSuccessful(ExtensionContext context) {
Copy link
Owner

Choose a reason for hiding this comment

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

I am gettting a log of 'Test Passed!' after test, but session info isn't being passed to Sauce Labs

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.

2 participants