All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.mojo.chronos.data.TestCaseResult Maven / Gradle / Ivy

Go to download

This plugin enables you to track and the executiontimes of a selection of Your unittests (JUnit or TestNG). One usage is to regard some of your automatic testcases as performancetests, tracking their executiontimes. Another usage is simply to monitor Your automatic tests to discover reasons for slow build times.

The newest version!
/*
 * The MIT License
 *
 * Original work sponsored and donated by National Board of e-Health (NSI), Denmark (http://www.nsi.dk)
 * Further enhancement before move to Codehaus sponsored and donated by Lakeside A/S (http://www.lakeside.dk)
 *
 * Copyright (c) to all contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is furnished to do
 * so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * $HeadURL: https://svn.codehaus.org/mojo/trunk/sandbox/chronos-maven-plugin/chronos/src/main/java/org/codehaus/mojo/chronos/jmeter/JMeterMojo.java $
 * $Id: JMeterMojo.java 14221 2011-06-24 10:16:28Z soelvpil $
 */
package org.codehaus.mojo.chronos.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class TestCaseResult {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id")
	protected Long id;

	@Column(name = "time")
	private int time;

	@Column(name = "success")
	private boolean success;

	@Column(name = "identifier")
	private String identifier;

	@Column(name = "timeOfMeasurement")
	private long timeOfMeasurement;

	public TestCaseResult() {
		// Do nothing
	}

	public TestCaseResult( boolean success, long timeOfMeasurement, int time ) {
		this.identifier = "id";
		this.success = success;
		this.timeOfMeasurement = timeOfMeasurement;
		this.time = time;
	}

	public int getTime() {
		return time;
	}

	public boolean isSuccess() {
		return success;
	}

	public String getIdentifier() {
		return identifier;
	}

	public long getTimeOfMeasurement() {
		return timeOfMeasurement;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy