Draftking POC Demo
Draftking POC Demo
Hello everyone, and welcome to this demo of our Proof of Concept (POC) for automating the pick6 application using C# Appium,
Spec Flow which is a BDD cucmber framework, and Extent Report. My name is [Your Name], and I'll be walking you through this
demo today.
Why C#?
Before we dive into the demo, I'd like to explain why we chose C# as our programming language for this POC. C# is a popular and
widely-used language for automating tests, especially for mobile applications. It has excellent support for Appium, which is the
tool we're using for mobile automation. Additionally, C# has a large community of developers, which means there are plenty of
resources available for learning and troubleshooting.
"For our automation project, we're using C# as the programming language. C# is a popular language for automation due to its ease
of use, flexibility, and extensive libraries.
We're using C# to write our SpecFlow step definitions, which contain the actual automation code that interacts with the mobile
application. We're also using C# to write our test utilities and helpers, which provide additional functionality and support for our
automation code.
By using C#, we're able to take advantage of its strong typing, object-oriented programming model, and extensive libraries, which
make it easier to write and maintain our automation code."
C# is a popular and widely-used programming language for automating tests, especially for mobile applications. Here are a few
reasons why we're using C# for this demo:
1. Appium Support: Appium, the popular mobile automation framework, has excellent support for C#.
2. SpecFlow Integration: SpecFlow, a popular BDD framework, has a seamless integration with C#.
3. Extent Report: Extent Report, a popular reporting framework, has a C# API, making it easy to generate reports.
4. Large Community: C# has a massive community, which means there are plenty of resources available for learning and
troubleshooting.
SpecFlow
Now, let's talk about SpecFlow. SpecFlow is a Behavior-Driven Development (BDD) framework that allows us to write tests in a
natural language style. It's a great tool for automating tests because it allows us to write tests that are easy to read and understand,
even for non-technical stakeholders can understand the automated Test Cases
"In this project, we're using SpecFlow to automate the pick6 app. SpecFlow is a Behavior-Driven Development (BDD) framework
that allows us to write automated tests in a natural language style. We define the login flow in a feature file using Gherkin syntax,
which is a simple language that describes the behavior of the application.
We then create step definitions for each step in the scenario using C#. These step definitions contain the actual automation code
that interacts with the mobile application. For example, the step definition for ' And I login with existing user ' might look like this:
By using SpecFlow, we can easily automate complex workflows and ensure that our tests are readable and maintainable."
2. The use of Appium to interact with the mobile application.
"To interact with the DraftKings mobile application, we're using Appium, which is an open-source automation framework for
mobile applications. Appium allows us to write automation code in a variety of programming languages, including C#.
In our project, we're using the Appium .NET driver to interact with the mobile application. We create an instance of the driver and
use it to perform actions on the application, such as tapping on buttons, entering text, and verifying element presence.
We've created a MobileDriverUtils class that provides a set of utility methods for interacting with the application, such as
tapping on elements, entering text, and verifying element presence.
For example, in our step definition for 'Tap on Today's Picks', we use the Appium driver to tap on the button:
Appium provides a lot of flexibility and power when it comes to automating mobile applications, and we're able to use it to
automate complex workflows and scenarios."
3. The use of Extent Report to generate a comprehensive report of the test execution.
"To generate a comprehensive report of our test execution, we're using Extent Report, which is a popular reporting framework for
automated tests. Extent Report provides a lot of features out of the box, including support for multiple test frameworks,
customizable reporting, and integration with CI/CD pipelines.
In our project, we're using Extent Report to log pass/fail status, screenshots, and logs for each test step. We create an instance of the
Extent Report logger and use it to log information throughout our test execution.
his code logs a pass status and a screenshot of the current state of the application.
By using Extent Report, we're able to generate a comprehensive report of our test execution that includes detailed information
about each test step, which helps us to identify and debug issues more easily."
In each step definition, we're using ExtentUtil.LogPass to log a pass message for the step. This will generate a report with the
step details and the pass/fail status.
"To identify elements on the mobile application, we're using XPath locators. XPath is a language for querying XML documents,
and it's commonly used in automation to identify elements on web pages and mobile applications.
In our project, we're using XPath locators to identify elements such as buttons, text fields, and labels. We define the XPath locator
for each element in our test utilities and helpers, and we use the Appium driver to find the element on the page.
For example
MobileDriverUtils.driver.FindElement(By.XPath("//*[@class='android.widget.EditText' and
@index='1']")).SendKeys("astest_2201.1");
This XPath locator identifies an EditText element with an index of 1 and sends the text "astest_2201.1" to it.
Demo Overview
For this demo, we'll be automating an End-to-End (E2E) scenario for the DraftKings application using SpecFlow. The scenario is:
Now, let's move on to the demo scenario. We're going to automate an End-to-End (E2E) scenario for the pick6 app application
using SpecFlow. The scenario is:
And Click on the pick group filter to expose the dropdown of available, upcoming pick groups.
And Create a Pick Set by choosing between two to six players from Pick Group
Then I should see the finalize & submit page with the Submit button displayed
Then I verify user is navigated back to homescreen pick after Post submit navigation
And I should see a confirmation toast with the message Your Picks were submitted along with view link
Now, let's take a look at the SpecFlow code for this scenario: public class LoginWithValidCredentilsStepDefinitions
MobileDriverUtils.tapusingCordinatesForTodaysPickBtn();
Thread.Sleep(10000);
// ...
}
Conclusion
That's it for this demo! I hope you've seen how we can use C# Appium, SpecFlow, and Extent Report to automate an E2E scenario
for the DraftKings application. If you have any questions or would like to see more, please let me know. Thank you for your time!
That's it for today's demo. We've shown how we can automate an E2E scenario for the DraftKings application using C# Appium,
SpecFlow, and Extent Report. We've also explained the benefits of using C# and SpecFlow for test automation. Thank you for
watching, and I hope you have any questions.
And Click on the pick group filter to expose the dropdown of available, upcoming pick groups.
And Create a Pick Set by choosing between two to six players from Pick Group
Then I should see the finalize & submit page with the Submit button displayed
Then I verify user is navigated back to homescreen pick after Post submit navigation
And I should see a confirmation toast with the message Your Picks were submitted along with view link
Script for Demo
Introduction (5 minutes)
Hello, and thank you for taking the time to review our automation demo for the Pick6 app.
The primary goal of this demo is to showcase our automation framework, demonstrate the testing capabilities, and highlight
specific features of the Pick6 app.
Before we begin, I'd like to clarify that we'll be using Appium, C#, and BDD framework SpecFlow for automation, and
we'll be demonstrating an end-to-end scenario.
Additional Tips
Throughout the demo, be sure to explain each step clearly and provide context for the client.
Use a conversational tone and avoid using technical jargon that might confuse the client.
Be prepared to answer questions and provide additional information as needed.
If the test fails, stay calm and rerun the scenario. It's essential to show the client that you can handle unexpected issues.