This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CI/CD = Automatically test, build, and deploy your code when you push changes | |
| CI => git push → tests run → build created | |
| CD => build → deploy to staging/production | |
| Developer pushes code | |
| ↓ | |
| Run unit tests | |
| ↓ | |
| Build Docker image | |
| ↓ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Docker is a tool that lets you package an application with everything it needs | |
| (code, Python version, libraries, OS dependencies) into a single unit called a container. | |
| Image → Blueprint (like a recipe) | |
| Container → Running instance of the image | |
| Dockerfile → Instructions to build the image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Django : https://docs.djangoproject.com/en/4.1/intro/tutorial01/ | |
| Check the python version of the system: 'python --version' | |
| It must be > 3.4 | |
| -----------------------------------Installation--------------------------------- | |
| Create virtual environment:- 'python -m venv myproject' | |
| Activate the environment:- 'source myproject/bin/activate' | |
| Install django:- 'python -m pip install Django' | |
| Check django version:- 'django-admin --version' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Object of Flask class is WSGI application. .....WSGI means Web server gateway interface runs python code to create web application. | |
| -> Install Flask in virtual environment. | |
| Some dependencies will automatically downloaded on the system during the installation of Flask. | |
| Werkzeug implements WSGI, Standard interface between application and server. | |
| Jinja is a template language that renders the pages your application serves. | |
| MarkupSafe comes with Jinja. It escapes untrusted input when rendering templates to avoid injection attacks. | |
| ItsDangerous securely signs data to ensure its integrity. This is used to protect Flask’s session cookie. | |
| Click is a framework for writing command line applications. It provides the flask command and allows adding custom management commands. | |
| Blinker provides support for Signals. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * send_keys() with contents containing spaces will effect in enter or shift | |
| * Use strip before using data | |
| * url - use concatenation ....minimize the use of | |
| * Better to use pom model. | |
| * use common functions in using send keys, click, select elements. | |
| * Before each action wait for webdriver | |
| eg: WebDriverWait(self.driver, 100).until(EC.element_to_be_clickable((By.XPATH,xpath))) | |
| * If issues to ajax elements : | |
| use | |
| eg:- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| We are using selenium python with POM model. | |
| POM :- for test maintenance and reducing code duplication. | |
| For reference vist : https://medium.com/@zackbunch/page-object-model-pom-in-selenium-python-73d0a805f2a8 | |
| We starts with creating the structure :- | |
| Folders created | |
| * Locators | |
| -> locators.py | |
| * Pages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List:- | |
| A list consists of mutable objects. (Objects which can be changed after creation) | |
| List has a large memory. | |
| List is stored in two blocks of memory (One is fixed sized and the other is variable sized for storing data) | |
| Creating a list is slower because two memory blocks need to be accessed. | |
| An element in a list can be removed or replaced. | |
| A list has data stored in [] brackets. | |
| Tuple:- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Applications are : | |
| * Machine translation => converts speech to text...Automatically generate transcripts, which are expensive when done manually. | |
| * Speech to text(cation generating) => Videos with subtitles. Wide variety of languages are there and same text spoken | |
| by male and female may be different, so that text representation is important. | |
| Text is unambigous, voice signals have wide variety. | |
| * Text to speech => Those who are able to hear, but can't see have benefit from converting text.... | |
| Recently google announced a system which automatically makes appointment and reservations for you by phone, | |
| ie, a robot would call the place you wanted a reservation. | |
| * Generating text => include machines writing entire chapters of popular novels like Game of Thrones and Harry Potter, with varying degrees of success. | |
| * Cipher Decryption => code breaking. |