Skip to content
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

feat(misc): added the automation code for testing of docs #174

Closed
wants to merge 7 commits into from

Conversation

gautamgambhir97
Copy link
Collaborator

  • added the automation code for docs testing

@gautamgambhir97 gautamgambhir97 force-pushed the feat/automation-code-testing-of-docs branch from 500f33d to 582fbcf Compare October 6, 2023 14:27


@pytest.mark.usefixtures("setup")
class TestFetchAgents:
Copy link
Member

Choose a reason for hiding this comment

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

I guess I'm a bit confused, probably needs some discussion; it looks like you're building a unit test per a test per a code block; you're building the website and then getting selenium to hit the copy button, after that you create a file with the python code, and run it with popen.

This of course would work, but feels really wrong 😅 In the short term, could you not iterate over all docs files, looking for python code blocks, and then re-use the logic for popen of the copied string? and test response on that?

I think after this, we'd look to have dedicated unit tests for each code block, but that is involved.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there might have been some misunderstanding, i though we have discussed to test the code blocks directly through the website using selenium.

can you please share what could go wrong with the current approach? since we will have to include the test cases for the individual files manually whenever there is new code block, i guess the either approach will behave the same?

Although, i have shared you the list of approaches to you in the personal message, what you are saying is there in the second point. can you please verify the approach?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry if there has been a misunderstanding, and you're right to have gone forward without some clear direction from me :) I get a lot of messages and some things slip by 👎

There isn't something wrong with this, I just think booting up the site, and running selenium is excessive.

@devjsc devjsc closed this Oct 18, 2023
@devjsc devjsc deleted the feat/automation-code-testing-of-docs branch July 18, 2024 10:00
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