- How do you test your web app?
- build automation
- This project
demonstrates the basic protractor-cucumber-typescript framewor k project setup.
-Record/Replay
-Scripting
-Scripting Page Objects
Record/Replay
-Record a test script as you use your application
-Many tools support this approach
Selenium IDE
Commercial tools
-Pros and cons of Record/Replay
Intuitive
Easy to create a test script
Don’t have to know much about the web application
Test scripts usually need rework
Test scripts are fragile
Test scripts hard to maintain
Hard to do more complex testing (e.g. data-driven tests)
Hard to
Scripting
-Write a test script using a low-level testing library
Selenium RC
-Pros and cons of Scripting
More powerful tests
Can do data-driven tests
Can reuse some test logic
Higher learning curve
Need
Test scripts still
Page Objects
-Create a domain model of your application
-Hide technical details inside the domain model
-High level tests written using a different language:
Programming language (Java,...)
Scripting language (Groovy, Ruby,...)
BDD/ATDD framework (
-Pros and cons of Page Objects
Much more powerful tests
Can do data-driven tests
Easy to reuse test logic
Tests are easier to maintain
Tests are understandable by testers
More up-front thought and design required
Selenium 2/
Next-Generation version of Selenium
Build-in support for Page Objects
One API - Many Drivers
Firefox
Chrome
The
The
The
automated-web-testing.pdf
build scripting
automated code quality
automated testing
The Maven Release Cycle
-Deploying a release involves many tasks
-Commit all current changes to version control
-Upgrade the version number
-Tag the release version
-Build and deploy this version
-Update the version number and commit the changes
-The Maven
Automates the release process
Updates version numbers
Commits changes and creates new SCM tags
Builds, tests and deploys to the Enterprise Repository
Using the Maven Release Plugin
-Audits your code
Check that there is no uncommitted code
Check that there are no snapshot dependencies
Prompts for release tag, branch and new version numbers
-then does the bookkeeping
Updates version numbers to release versions
Creates a new release tag in SCM
Updates version numbers to next SNAPSHOT versions
Commit these changes to SCM
-By default, Maven will prompt you for:
Release version number
Release tag
Next snapshot version number
-This is not appropriate for automated builds
-Use batch mode to use sensible default values
-Do the real work
Checkout a release version
Build, test and deploy to the Enterprise repository
-Don’t use the maven-release-plugin on your own machine
-Run it on a build server
Automating the deployment process
-Don’t rebuild, reuse
Download application binaries from the Enterprise repository
Externalize
Patch
Deploy to target environment
Deployment strategies
- direct reuse
- patching
Deployment strategies - direct reuse
Reuse from the repository without
Externalized environment-
JNDI
Local environment-
Deployment strategies - patching
Reuse binaries from the repository
Can use overlays in Maven
Automated web deployment with Cargo
Start, stop and install application servers
Deploy to different application servers
Run a stand-alone instance
Or deploy to an existing server
Deploying to an embedded Jetty instance
The simplest way to use Cargo with Maven
Deploying to a “real” application server
Deploy to a locally installed instance
Download and install a server as required
Deploy to a running server
Start and stop a server
Automated web testing
-Many strategies:
Run tests before deployment
Run tests against the deployed application
-Basic principle - don’t rebuild, deploy
-Create a special Maven project to run your web tests
Testing Snapshots or Release Candidates - an approach
-Use a dedicated release candidate branch
Automated tests are (also) run against the release candidate branch
Updated version numbers need to
Use multiple repositories on your Enterprise repository
e2e
https://github.com/igniteram/protractor-cucumber-typescript
- Delightful JavaScript Testing
Jest is used by Facebook to test all JavaScript code including React applications. One of Jest's philosophies is to provide an integrated "zero-configuration" experience. We observed that when engineers are provided with ready-to-use tools, they end up writing more tests, which in turn results in more stable and healthy code bases.
https://jestjs.io/
- Front-end
Using jest and enzyme to tests if components are rendered normally.
https://github.com/alpaca0984/QuizMaster
- spec is a full-featured testing framework that will let you write what Rails considers unit tests, functional tests, and integration tests.
All of these exercise Ruby code through various layers of your Rails application.All of these tests simulate requests to your Rails application, but don'tactually run the application end-to-end over the network.
cucumber is a browser based integration testing framework, which allows writing automated tests that run against the entire Rails application accessed from within an automated web browser. This allows you to write automated tests about in-browser behavior for JS or CSS. Cucumber provides a unique angle on integration testing that uses plain english specification mapped to code via regular expressions. This allows a more natural "Behavior Driven Development" model - describing what a web application should do, in plain language, from the perspective of the user.
capybara is a particular web driver powering the cucumber integration testing framework, that uses headless webkit . This allows running a headless (without UI) Chrome/Webkit browser for automated testing. This is very useful both in development, but especially on a remote test/continuous integration server.
https://stackoverflow.com/questions/22491145/difference-between-rspec-capybara-and-cucumber
This blog will help to get more ideas. This is very helpful for Software Testing learners. Thank you for sharing this wonderful site. If someone wants to know about Software QA services this is the right place for you Software QA Companies.
ReplyDeleteMuch appreciate you sharing this.
ReplyDelete