I have a folder containing several files starting with "test_" that each contain tests. How do I execute all the files, using py.test, under a single run, with Eclipse?
            Asked
            
        
        
            Active
            
        
            Viewed 341 times
        
    0
            
            
        - 
                    this might help https://stackoverflow.com/questions/1732438/how-do-i-run-all-python-unit-tests-in-a-directory – akash karothiya Jun 07 '17 at 12:49
- 
                    Not really, it isn't Eclipse or pytest specific. – rbs Jun 07 '17 at 13:00
- 
                    you want to do this programmatically or can use UI – akash karothiya Jun 07 '17 at 13:01
- 
                    I want to do it via Eclipse interface – rbs Jun 07 '17 at 13:09
- 
                    Here you go, check my answer – akash karothiya Jun 07 '17 at 13:11
1 Answers
1
            Right click on Parent/Test module, select Run As and then select Python unit-test. It will run all the test cases which starts with test_ of that module 
 
    
    
        akash karothiya
        
- 5,736
- 1
- 19
- 29
- 
                    1As a note, in your pyunit preferences, you may have to select to use pytest (as the default is using the unittest runner). – Fabio Zadrozny Jun 08 '17 at 12:08
- 
                    1To clarify: the names of the test files and test methods have to start with "test_" – Stefan Sep 07 '17 at 12:43
