Commits

Kostya Marchenko committed 18c0b96

Modified POM so that it's possible to run tests from maven. Updated readme file with minor changes

Comments (0)

Files changed (5)

ConcordionCamera.iml

     <orderEntry type="library" name="Maven: net.java.dev.jna:jna:3.2.2" level="project" />
     <orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-iphone-driver:2.0rc2" level="project" />
     <orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-support:2.0rc2" level="project" />
-    <orderEntry type="library" name="Maven: jython:jython:2.1" level="project" />
     <orderEntry type="library" name="Maven: org.concordion:concordion:1.4.1" level="project" />
     <orderEntry type="library" name="Maven: junit:junit-dep:4.8.2" level="project" />
     <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />

ConcordionCamera.ipr

         <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.8.2/junit-4.8.2-sources.jar!/" />
       </SOURCES>
     </library>
-    <library name="Maven: jython:jython:2.1">
-      <CLASSES>
-        <root url="jar://$MAVEN_REPOSITORY$/jython/jython/2.1/jython-2.1.jar!/" />
-      </CLASSES>
-      <JAVADOC>
-        <root url="jar://$MAVEN_REPOSITORY$/jython/jython/2.1/jython-2.1-javadoc.jar!/" />
-      </JAVADOC>
-      <SOURCES>
-        <root url="jar://$MAVEN_REPOSITORY$/jython/jython/2.1/jython-2.1-sources.jar!/" />
-      </SOURCES>
-    </library>
     <library name="Maven: mx4j:mx4j-tools:3.0.1">
       <CLASSES>
         <root url="jar://$MAVEN_REPOSITORY$/mx4j/mx4j-tools/3.0.1/mx4j-tools-3.0.1.jar!/" />
         </developer>
     </developers>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.8.1</version>
+                <configuration>
+                    <includes>
+                        <!-- Include normal unit tests -->
+                        <include>com/**/*Test.java</include>
+                        <!-- Include main specification file which will run the rest-->
+                        <include>spec/sqanta/concordioncameraextension/ConcordionCameraExtensionTest.java</include>
+                    </includes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
     <dependencies>
         <dependency>
             <version>2.0rc2</version>
         </dependency>
         <dependency>
-            <groupId>jython</groupId>
-            <artifactId>jython</artifactId>
-            <version>2.1</version>
-        </dependency>
-        <dependency>
             <groupId>org.concordion</groupId>
             <artifactId>concordion</artifactId>
             <version>1.4.1</version>
 1. Tell concordion to use ConcordionCamera extension by setting "concordion.extensions" global variable to "com.sqanta.concordioncameraextension"
 2. Put <span cx:concordionCamera="format"/> command in your specification in the place where you want to display embedded video of your test. Video recording will start at the same moment as test and will finish when test finished.
 
-For more details on how to use extension see it's specification here http://<path to spec>. You can execute this specification by running ConcordionCameraTest.java to verify that it works.
+For more details on how to use extension see it's specification. You can execute this specification by running ConcordionCameraExtensionTest.java to verify that it works.
 
-You can also use video recorder individually not as extension. To be able to recorder just create instance of ch.randelshofer.ScreenRecorder class and then use can use start() and stop() methods to control video recording.
+You can also use video recorder as standalone component. Just use ConcordionCamera class on it's own. It also comes with unit test which will help you better understand how to use it.
 
 = Plans =
 I'm planning to improve this extension to make it work with VNC to be able to record videos of automated tests running on remote machines (when using Selenium Grid for example).

src/test/java/spec/sqanta/concordioncameraextension/BaseRecordVideoFixture.java

         File videoFile = Helpers.getConcordionCameraVideoFiles(this.getClass())[0];
         long fileSize = videoFile.length() / 1024;
 
-        //Check that file size is > 500 Kb to make sure that video was recorded
-        if (fileSize > 500) {
+        //Check that file size is > 300 Kb to make sure that video was recorded
+        if (fileSize > 300) {
             return "not empty";
         }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.