Commit 1ac39c35 authored by Matyáš Latner's avatar Matyáš Latner

Přidání integračních testů - rozděleno na dva projekty: APP -> Vývoj samotné...

Přidání integračních testů - rozděleno na dva projekty: APP -> Vývoj samotné aplikace, TEST -> Vývoj integačních testů pomocí Robotium
parent fd103d5d
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cz.nic</groupId>
<artifactId>tablexia</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>tablexia-app</artifactId>
<name>Tablexia App</name>
<packaging>apk</packaging>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${android.library.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.andengine</groupId>
<artifactId>andengine</artifactId>
<version>${andengine.version}</version>
<type>apklib</type>
<scope>system</scope>
<systemPath>${basedir}/libs/andengine-${andengine.version}.apklib</systemPath>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<sdk>
<platform>${andoird.api.level}</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cz.nic</groupId>
<artifactId>tablexia</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>Tablexia</name>
<!--////////////////////////////// PROPERTIES ///////////////////////////-->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<modelVersion>4.0.0</modelVersion>
<groupId>cz.nic</groupId>
<artifactId>tablexia</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<!-- Plugins -->
<android-maven-plugin.version>3.6.0</android-maven-plugin.version>
<api.platform>14</api.platform>
<name>Tablexia</name>
<inceptionYear>2013</inceptionYear>
<!-- Dependencies -->
<android.version>4.1.1.4</android.version>
<andengine.version>1.0.0-SNAPSHOT</andengine.version>
</properties>
<!--////////////////////////////// DEPENDENCIES ///////////////////////////-->
<developers>
<developer>
<name>Matyáš Latner</name>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Václav Tarantík</name>
<roles>
<role>Developer</role>
</roles>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${android.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.andengine</groupId>
<artifactId>andengine</artifactId>
<version>${andengine.version}</version>
<type>apklib</type>
<scope>system</scope>
<systemPath>${basedir}/libs/andengine-${andengine.version}.apklib</systemPath>
</dependency>
</dependencies>
<!--////////////////////////////// BUILD ///////////////////////////-->
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${android-maven-plugin.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<zipalign>
<skip>false</skip>
<verbose>true</verbose>
</zipalign>
<sdk>
<platform>${api.platform}</platform>
</sdk>
</configuration>
<executions>
<execution>
<id>alignApk</id>
<phase>install</phase>
<goals>
<goal>zipalign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<andoird.api.level>14</andoird.api.level>
<android.library.version>4.1.1.4</android.library.version>
<andengine.version>1.0.0-SNAPSHOT</andengine.version>
</properties>
<!--////////////////////////////// REPORTING ///////////////////////////-->
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</reporting>
</project>
<modules>
<module>app</module>
<module>test</module>
</modules>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="lib" path="Robotium-4.1/robotium-solo-4.1.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/NotePadTest/Robotium-4.1/robotium-solo-4.1-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry combineaccessrules="false" kind="src" path="/Tablexia"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
/target
/bin
/gen
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Tablexia-it</name>
<comment></comment>
<projects>
<project>NotesList</project>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.nic.tablexia.test"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name">
<uses-library android:name="android.test.runner" />
</application>
<instrumentation
android:targetPackage="cz.nic.tablexia"
android:name="android.test.InstrumentationTestRunner"/>
</manifest>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="NewApi">
<ignore path="src/com/jayway/android/robotium/solo/Waiter.java" />
</issue>
</lint>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cz.nic</groupId>
<artifactId>tablexia</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>tablexia-test</artifactId>
<name>Tablexia Test</name>
<packaging>apk</packaging>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-test</artifactId>
<version>${android.library.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.jayway.android.robotium</groupId>
<artifactId>robotium-solo</artifactId>
<version>4.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.nic</groupId>
<artifactId>tablexia-app</artifactId>
<version>${project.version}</version>
<type>apk</type>
</dependency>
<dependency>
<groupId>cz.nic</groupId>
<artifactId>tablexia-app</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<type>jar</type>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>${andoird.api.level}</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.6</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=android-15
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World!</string>
<string name="app_name">TestNoteList</string>
</resources>
/*
* This is an example test project created in Eclipse to test NotePad which is a sample
* project located in AndroidSDK/samples/android-11/NotePad
*
*
* You can run these test cases either on the emulator or on device. Right click
* the test project and select Run As --> Run As Android JUnit Test
*
* @author Renas Reda, renas.reda@gmail.com
*
*/
package cz.nic.tablexia.test;
import android.test.ActivityInstrumentationTestCase2;
import com.jayway.android.robotium.solo.Solo;
import cz.nic.tablexia.UserSelectorActivity;
public class UserSelectorActivityTest extends ActivityInstrumentationTestCase2<UserSelectorActivity>{
private Solo solo;
public UserSelectorActivityTest() {
super(UserSelectorActivity.class);
}
@Override
public void setUp() throws Exception {
solo = new Solo(getInstrumentation(), getActivity());
}
@Override
public void tearDown() throws Exception {
solo.finishOpenedActivities();
}
public void testUserSelectorScreen() throws Exception {
solo.assertCurrentActivity("Expected UserSelectorActivity activity not found!", "UserSelectorActivity");
assertTrue("Expected title text not found!", solo.searchText("Vyber svůj profill a dej se do toho!"));
}
}
/*
* This is an example test project created in Eclipse to test NotePad which is a sample
* project located in AndroidSDK/samples/android-11/NotePad
*
*
* You can run these test cases either on the emulator or on device. Right click
* the test project and select Run As --> Run As Android JUnit Test
*
* @author Renas Reda, renas.reda@gmail.com
*
*/
package cz.nic.tablexia.test;
import android.test.ActivityInstrumentationTestCase2;
import com.jayway.android.robotium.solo.Solo;
import cz.nic.tablexia.UserSelectorActivity;
public class UserSelectorActivityTest extends ActivityInstrumentationTestCase2<UserSelectorActivity>{
private Solo solo;
public UserSelectorActivityTest() {
super(UserSelectorActivity.class);
}
@Override
public void setUp() throws Exception {
solo = new Solo(getInstrumentation(), getActivity());
}
@Override
public void tearDown() throws Exception {
solo.finishOpenedActivities();
}
public void testUserSelectorScreen() throws Exception {
solo.assertCurrentActivity("Expected UserSelectorActivity activity not found!", "UserSelectorActivity");
assertTrue("Expected title text not found!", solo.searchText("Vyber svůj profil a dej se do toho!"));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment