public void runTest(int startinstancecount, int maxiterations, int extraruns)
	{
		// Checks the parameters
		if (startinstancecount < 0 || maxiterations <= 0 || extraruns < 0)
		{
			System.out.println("The test parameters must be 0 or above");
			return;
		}
		
		// Prepares the variables
		int currentinstances = startinstancecount;
		int iterations = 0;
		boolean testrun = true;
		int extrarunsleft = extraruns;
		ArrayList<Integer> values = new ArrayList<Integer>();
		
		// I initialize the variables here already so that the memory 
		// allocation doesn't affect the recorded time
		long startnanos;
		int runtime;
		
		// Increases the number of instances in the structure 
		// to the start amount
		addInstances(currentinstances);
		
		// Informs the user with a message
		System.out.println("Starting the test\n" + getTestName() + "\nWith " + 
				maxiterations + " iterations and " + extraruns + " extra checks\n");
		
		// Also collecs suplemental data about the total time used in the test
		long starttime = System.currentTimeMillis();
		long totaltime;
		long totaltestingtime = 0;
		
		// Iterates and prints the collected data.
		// The first iteration is a test 
		// run that isn't recorded (it seems that Java needs to run the method 
		// once before it starts to work fast enough)
		while (iterations < maxiterations)
		{
			// Prepares for testing
			prepareTest();
			
			// Runs the method and checks the used processing time
			startnanos = System.nanoTime();
			runMethod();
			runtime = (int) (System.nanoTime() - startnanos);
			
			// The following parts are not made during the test run
			if (testrun)
			{
				testrun = false;
				continue;
			}
			
			totaltestingtime += runtime;
			
			// If there were no extra runs,
			// Simply prints the collected data
			if (extraruns == 0)
				printData(currentinstances, runtime);
			// Otherwise simply collects the data
			else
				values.add(runtime);
			
			// Prepares fo the next iteration
			iterations ++;
			
			// If no extra runs are left,
			// Doubles the number of instances in the structure
			// (adds one if there are currently 0 instances)
			if (currentinstances == 0)
			{
				addInstances(1);
				currentinstances = 1;
			}
			else if (extrarunsleft <= 0)
			{
				// If extraruns are used, produces the best value and prints it
				if (extraruns > 0)
				{
					printData(currentinstances, produceValue(values));
					// Also removes all collected data
					values.clear();
				}
				
				addInstances(currentinstances);
				currentinstances *= 2;
				extrarunsleft = extraruns;
			}
			else
			{
				extrarunsleft --;
				// Extrarun does not count as an iteration
				iterations --;
			}
		}
		
		totaltime = System.currentTimeMillis() - starttime;
		
		// Prints a final summary about the test
		System.out.println("\nThe test was successfully finished!");
		System.out.println("The process took " + totaltime + " milliseconds.");
		System.out.println("The tests took " + 
				totaltestingtime + " nanoseconds in total.");
		
		// Finally releases the memory used in the test's data structure
		clearStructure();
	}