Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Here are described the steps to connect TestRail with karate integration tests.

...

  • Copy all related files from package org.folio.testrail of acquisitions to your project path
  • Create jUnit test file and extend from AbstractTestRailIntegrationTest like FinanceApiTest


    Code Block
    languagejava
    titleFinanceApiTest Example
    public class FinanceApiTest extends AbstractTestRailIntegrationTest {
    
    	public FinanceApiTest() {
    		super(new TestRailIntegrationHelper(FINANCE_CONFIGURATION));
    	}
    
    	@Test
    	void budgetExpenseClasses() {
    		runFeatureTest("budget-expense-classes");
    	}
    }


  • Add constructor with your own configuration see FinanceApiTest

  • Add test method that will run your feature file like budget-expense-classes via runFeatureTest method that located in order to FINANCE_CONFIGURATION see budgetExpenseClasses

  • Add your suite Configuration see Integrate TestRail with Karate setup section. For FinanceApiTest we use FINANCE_CONFIGURATION
  • Add two setup mehtods into your test file like financeApiTestBeforeAll (to setup tenant, users and setup data for module run) and financeApiTestAfterAll (to destroy tenant and all related data for module run)


    Note: finance-junit.feature and destroy-data.feature should contain logic to setup and destory data for tenant.

...

To get suite id and section id you can use postman collection Test Rail.postman_collection.json (Note: Update Authorization цшер with basic Auth and your credentials)

...