How to prevent my android app from shutting down when i run appium using serenity

I am using Serenity bdd with junit 4 for running appium on native Android app. After each @Test run my app shutsdown. I have tried to search a lot on google to find how to avoid the shutdown. Problem is my tests are so minor (like clicking on up button and checking if the required value increased by a specific amount, etc) that I do not need or want to shutdown app between test run. Now I could have added all the tests to a single @Test, but I need to setup a test listener to listen to the events and write to a csv report that we have to submit to FDA for approval. Right now I am grouping my similar tests into the @Test, but I still need different @Tests so that the testID’s get logged as a separate test id in the reports.

My question is how can I prevent the shutdown from happening. I have tried appium.noReset to true but that does not work. I have added my and junit test below for your reference:

#webdriver.timeouts.implicitlywait = 1000
#Note: Commented out ‘implicitlywait’ to avoid use of implicit wait in conjunction with explicit wait
#TODO: Check stability of TP run; what is default behavior when implicitlywait is not set?

webdriver.driver = appium
appium.platformName = Android
appium.platformVersion = 10.0
#Replace deviceName and udid with your S6 Tablet's Serial Number
appium.deviceName = HGFJGKHLJ
appium.udid =HGFJGKHLJ

appium.hub =

#appium.systemPort = 8205

appium.appPackage = CP.Android

appium.automationName = uiautomator2

appium.appActivity = crc6429e3927486beccbc.ActivityLicenseBrowse

appium.dontStopAppOnReset = true

appium.resetKeyboard = true

appium.unicodeKeyboard = false

appium.browserName =
#The above capability is needed to run the test...

appium.newCommandTimeout = 5000


appium.skipDeviceInitialization = true

appium.skipServerInstallation = true

#Skips unlock during session creation
appium.skipUnlock = false	

appium.noSign = true

#appium.dontStopAppOnReset = true

appium.ignoreUnimportantViews = true

appium.disableAndroidWatchers = true

appium.disableWindowAnimation = true = CP Automation Report <br/> <h5> Device: Samsung Galaxy Tab S6 <br/> <h5/>

#serenity.take.screenshots = DISABLED
serenity.take.screenshots = AFTER_EACH_STEP

serenity.console.headings = normal

#serenity.requirement.types = feature, story

step.creation.strategy = legacy

serenity.verbose.steps = true

serenity.logging = verbose


serenity.console.headings=none = false

@WithTags({ @WithTag(type = "TP", name = "TP") })
public class TP397_P1_S06 {

	WebDriver appiumDriver;

	UserLoginsWithValidCredentials user;

	TP_Steps tpSteps;

	UserCreatesPainAreaMap patientLocator;

	UserCreatesORSession session;

	UserCreatesORSession createOR;

	ConfigElectrodePage setAnodeCathode;

	ORSession_CheckRangeValuesOfTonicStimulationMode verifier, rangeVal;

	UserVerifiesElectrodeOnORSession electrodeConfig;

	ProgramConfiguration programConfiguration;

	ORSession_CheckRangeValuesOfTonicStimulationMode stepSizeSelect;

	ORSession_RangeValuesPage ampSize, ampUpDown, upDownArrowDisabledForRange, verifyStepSize;

	NewPatientProfilePage impedances;

	NewPatientProfilePage screenSelector, impedance;

	ToastMessageStep toastMessageStep;

	String amp, pw, rate, cathode, anode;

	int initialImpedanceListCount, finalImpedanceListCount, result;
	private static final Logger log = LogManager.getLogger(;
	private static ExecutionListener execListener;
	private static ResultWriterCSV resultWriter;

	private static boolean dunit = false;

	@Title("User logins to the CP Application, searches the patient and creates OR session")
	public static void setUpTest() {"************************Start Setup************************");
			resultWriter = ResultWriterCSV.getInstance();
			// Create listeners to
			execListener = new ExecutionListener();
			user.userOpensTheApplication();"User launching the application.");
			user.userOpensTheApplication();"user will Login with New credentials successfully.");
			user.userEntersNewCredentials();"User will click on Login.");
			// session.createORSession();
			session.userViewsCreateNewSessionPageAfterClickingOnORSessionButton();"user will set A1 as Anode and A2 as Cathode");
			setAnodeCathode.setCathode("A2");"************************Setup Complete************************");


	@Title("Increase and decrease Amplitudes according to the step sizes")
	public void TP397_ID27_ID32_Test() {
		ResultWriterParams.testCaseId = "TP397_ID27_ID32";
		ResultWriterParams.acceptanceCriteria = "Increase and decrease Amplitudes according to the step sizes";

		rangeVal.userShouldBeAbleToEnterTheRequiredParameterValues("Amplitude", "120");

		// Purposely added to fail below test with assertion error
		// ampSize.clickOnStep120();
		// verifyStepSize.verifyIfStepSizeIsSelected_120("120");"Amplitude value increases according to their default step size");

		// Test2 - Click the down button
		// Verify if application decreases amplitude value by 40µA

		System.out.println("Hola-----------------------");"Amplitude value decreases according to their default step size");


	@Title("Amplitude increase is limited to maximum 10200µA and Amplitude decrease is limited to minimum 40µA")
		public void TP397_ID11_ID10_Test() {
			ResultWriterParams.testCaseId = "TP397_ID11_ID10";
			ResultWriterParams.acceptanceCriteria = "Amplitude increase is limited to maximum 10200µA and Amplitude decrease is limited to minimum 40µA";
			rangeVal.userShouldBeAbleToEnterTheRequiredParameterValues("Amplitude", "30");
			toastMessageStep.assertIfEqual("Warning! Value out of range. Valid Range: 40 - 10200");

	public static void cleanup() {
		System.out.println("After class cleanup executed*****************");