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

Need help to create pytest Framework #3701

Closed
anilgowdamys opened this issue Jul 20, 2018 · 3 comments
Closed

Need help to create pytest Framework #3701

anilgowdamys opened this issue Jul 20, 2018 · 3 comments
Labels
type: question general question, might be closed after 2 weeks of inactivity

Comments

@anilgowdamys
Copy link

Hi Pytest Experts,

i am new to pytest. I Request to help me on creating a framework in pytest.
my requirement is as below.

  1. i will be having n number of testfiles
  2. for each testfiles there will be specific folder which contains input files.
  3. each testfiles will have different test function for each input files.
  4. Also I should be capable of running specific testfiles which should be configured in one txt file
    ex:- asume i have run_reg.txt in which i will specify which all testfiles should run

I kindly need your help in designing this frame work. Please help.
Thanks in advance

@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #3574 (Help: Exit pytest cleanly "mid" run?), #2530 (Is it possible to run Robot Framework's unittests with Pytest?), #1411 (Pytest stops), #2310 (tox needed?), and #1602 (pytest.print()).

@pytestbot pytestbot added the type: question general question, might be closed after 2 weeks of inactivity label Jul 20, 2018
@asottile
Copy link
Member

You'll probably be able to solve most (if not all) of those requirements with pytest.mark.parametrize -- here's an example from some of my code that sounds roughly like what you're describing. Note here that I'm listing files in a data directory and using the filename as the input parameter to the test.

You might also find the -k commandline argument useful for selecting / deselecting specific tests.

@asottile
Copy link
Member

hello @anilgowdamys -- if this isn't sufficient to answer your issue please comment below and we can reopen / provide more assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question general question, might be closed after 2 weeks of inactivity
Projects
None yet
Development

No branches or pull requests

3 participants