Skip to content

Added custom fixture to fix session merge issue#9

Open
UjjawalShakya wants to merge 3 commits intobrowserstack:mainfrom
UjjawalShakya:custom-fixture
Open

Added custom fixture to fix session merge issue#9
UjjawalShakya wants to merge 3 commits intobrowserstack:mainfrom
UjjawalShakya:custom-fixture

Conversation

@UjjawalShakya
Copy link
Copy Markdown

No description provided.



def test_bstack_sample(page) -> None:
def test_sample(session_capabilities) -> None:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same change for local test as well

conftest.py Outdated
result = page.evaluate("() => {}", browser_stack_command)
return json.loads(result)

if os.environ.get('REMOTE', 'true') == "true":
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this condition not needed

conftest.py Outdated
def session_capabilities(playwright: Playwright):
global timenow
global lock
test_name = os.environ.get('PYTEST_CURRENT_TEST').split(' ')[0].split('::')[1]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

doesn't this create duplicate tests at browserstack. Please attach sessions

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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