Web Quick Start Guide
Quick Start guide for web automation using Ekam
Execute an example test
Step 1: Open the example web test
Open src/java/ekam/example/web/WebExampleTest.java
. This test opens https://ekam.studio and navigates to documentation link. Verifies the title.
package ekam.example.web;
import com.testvagrant.ekam.testBases.testng.WebTest;
import ekam.example.web.pages.EkamStudioHomePage;
import io.qameta.allure.Issue;
import io.qameta.allure.TmsLink;
import org.testng.annotations.Test;
import static com.testvagrant.ekam.commons.LayoutInitiator.Page;
import static org.testng.Assert.assertEquals;
@Test(groups = "web")
public class WebExampleTest extends WebTest {
@TmsLink("TC-Web-001")
@TmsLink("TC-Web-002")
@Issue("Issue-002")
@Test(groups = "web", description = "Should navigate to Ekam documentation")
public void shouldNavigateToEkamDocs() {
String title = Page(EkamStudioHomePage.class)
.navigateToDocs()
.getTitle();
assertEquals(title, "Getting started - Ekam");
}
}
Step 2: Execute the test
We need to make a IntelliJ IDEA setting change to execute tests via IDE
Preferences → Build, Execution, Deployment → Build Tools → Gradle
Run tests using : IntelliJ IDEA
Lets execute test shouldNavigateToEkamDocs
from IDE
Step 3: Execute the test from command line
Let us now run the test. From your terminal execute
./gradlew runWebTests
Step 4: View reports
Ekam, by default generates allure report. To view the recent run, execute the below command from terminal
./gradlew allureServe
The command once executed successfully will launch a report on your default browser.
Next steps
Congratulations!! you have successfully kick-started Web automation with Ekam. Now that we have executed a test, let us start writing a new test. Let’s move to Authoring first Web Test.