This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example Pattern to use to quickly create continuous Performance tests along side Functional Acceptance Tests for REST APIs | |
*/ | |
package example | |
import static org.junit.Assert.assertEquals | |
import org.junit.Test | |
/** | |
* Always good to have a parent class for test plans to centralize code across all test plans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface FunctionN<T,R> { | |
R apply(T...t); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package weden.jason.restTests | |
import org.testng.annotations.Test | |
import org.scalatest.testng.TestNGSuite | |
import org.apache.log4j.{Logger, LogManager} | |
import cc.spray.http._ | |
import cc.spray.http.HttpMethods._ | |
import cc.spray.can.HttpClient | |
import akka.config.Supervision._ | |
import akka.actor.{PoisonPill, Actor, Supervisor} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package weden.jason.dbaseFuncTests | |
import org.testng.annotations.Test | |
import org.scalatest.testng.TestNGSuite | |
import org.apache.log4j.{Logger, LogManager} | |
import org.squeryl.adapters.PostgreSqlAdapter | |
import java.util.Date | |
import org.squeryl.{Schema, Session} | |
class ScalaFunctionalTests extends TestNGSuite { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE customer | |
(First_Name char(50), | |
Last_Name char(50), | |
Address char(50), | |
City char(50), | |
Country char(25), | |
Birth_Date date) | |
insert into customer values (jason,weden,4 Mow Lane, Albany, NY, 12-2-1972) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package weden.jason.authServerFuncTests | |
import org.testng.annotations.Test | |
import org.testng.Assert._ | |
import org.scalatest.testng.TestNGSuite | |
class ScalaFunctionalTests extends TestBase with TestNGSuite { | |
@Test(invocationCount = 3) | |
def easyTest() { | |
import TestBase._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<groupId>org.codehaus.groovy.maven</groupId> | |
<artifactId>gmaven-plugin</artifactId> | |
<version>${gmaven-version}</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>generateStubs</goal> | |
<goal>compile</goal> | |
<goal>generateTestStubs</goal> | |
<goal>testCompile</goal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package weden.jason.qa.someProduct; | |
import java.util.List; | |
import java.util.Map; | |
import org.apache.log4j.LogManager; | |
import org.apache.log4j.Logger; | |
import org.testng.annotations.DataProvider; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package weden.jason.qa.someProduct; | |
/** | |
* This is the groovy class which puts the test cases in the external testCases.properties | |
* file into a data structure for the java program to use. | |
*/ | |
public class TestcaseGrabber { | |
protected List<Map<String,String>> getTestcases() { | |
def testConfig = null; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testCases = [ | |
['testDescription': 'Initial Test', | |
'xmlToUse' : '''<searchWithXML> | |
<id>40014</id> | |
<date></date> | |
<enddate></enddate> | |
<value>true</value> | |
</searchWithXML>'''], | |
['testDescription': 'Second Test', |
NewerOlder