Failing to include BaseModuleContextSensitiveTest using maven dependency

i want to make tests in within my meta deploy module.But including the dependency that brings in BaseModuleContextSensitiveTest is failing.Any help ??My pom.xml from metata deploy -api looks as below

4.0.0
<parent>
	<groupId>org.openmrs.module</groupId>
	<artifactId>metadatadeploy</artifactId>
	<version>1.8.2-SNAPSHOT</version>
</parent>

<artifactId>metadatadeploy-api</artifactId>
<packaging>jar</packaging>
<name>Metadata Deploy API</name>
<description>API project for metadatadeploy</description>

<dependencies>

	<!-- Begin OpenMRS modules -->

	<dependency>
		<groupId>org.openmrs.module</groupId>
		<artifactId>metadatasharing-api</artifactId>
	</dependency>

	<dependency>
		<groupId>org.openmrs.module</groupId>
		<artifactId>serialization.xstream-api</artifactId>
	</dependency>

	<!-- End OpenMRS modules -->

	<!-- Begin OpenMRS core -->

	<dependency>
		<groupId>org.openmrs.api</groupId>
		<artifactId>openmrs-api</artifactId>
	</dependency>

	<dependency>
		<groupId>org.openmrs.web</groupId>
		<artifactId>openmrs-web</artifactId>
	</dependency>

	<dependency>
		<groupId>org.openmrs.api</groupId>
		<artifactId>openmrs-api</artifactId>
		<type>test-jar</type>
		<scope>test</scope>
	</dependency>

	<dependency>
		<groupId>org.openmrs.web</groupId>
		<artifactId>openmrs-web</artifactId>
		<type>test-jar</type>
		<scope>test</scope>
	</dependency>



	<dependency>
		<groupId>org.openmrs.test</groupId>
		<artifactId>openmrs-test</artifactId>
		<type>pom</type>
		<scope>test</scope>
	</dependency>

	<!-- End OpenMRS core -->

	<!-- Begin external libraries -->
	<dependency>
        <groupId>org.openmrs.module</groupId>
        <artifactId>metadatasharing-api</artifactId>
        <version>1.0.9</version>
    </dependency>

	<dependency>
		<groupId>net.sf.opencsv</groupId>
		<artifactId>opencsv</artifactId>
	</dependency>


	<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
	<!-- End external libraries -->
</dependencies>

<build>
	<resources>
		<resource>
			<directory>src/main/resources</directory>
			<includes>
				<include>**/*.properties</include>
				<include>**/*.xml</include>
			</includes>
			<filtering>true</filtering>
		</resource>
		<resource>
			<directory>src/main/resources</directory>
			<excludes>
				<exclude>**/*.properties</exclude>
				<exclude>**/*.xml</exclude>
			</excludes>
			<filtering>false</filtering>
		</resource>
	</resources>

	<testResources>
		<testResource>
			<directory>src/test/resources</directory>
			<filtering>false</filtering>
		</testResource>
	</testResources>
</build>

Can you share the test failure log?

@dkayiwa i got this solved thanks

@herbert24 you might consider the situation of others stumbling on this thread and never knowing what you did to solve the problem that you exposed.

@mksd Adding the below dependency to the pom.xml solved the problem

                 <dependency>
		<groupId>org.openmrs.api</groupId>
		<artifactId>openmrs-api</artifactId>
		<type>test-jar</type>
		<scope>test</scope>
	    </dependency>

It’s already there, where did you need to add this?

@mksd it looks like my work space for the metadata-api had not built by the time i sent this.The above pom is under metadata-api.when i remove the above dependency,the error reflects and it clears after adding it back.

I’m afraid, I didn’t follow.

@mksd heilo ,am getting the same problem again ,BaseModuleContextSensitiveTest cannot be resolved this is my pom ,https://pastebin.com/7YJW40tU

I thought you were sharing the current error log.

Can you point us to a branch where the build error can be reproduced? I have lost track a little here…