Pycharm can still play like this?

Pycharm can still play like this?

As we all know, pycharm is an excellent editor for writing python. You can also install a lot of plug-ins to complete various Sao operations.

One day, on a whim, I searched for robot in the plugin library of pycharm.

Well, I found that there is a plug-in library that supports robotframework, so I tried it secretly.

Although it is not friendly enough compared to eclipse's support for robot scripts, the installation is extremely simple.

Next, please follow me to see how to complete the realization and operation of the robotframework use case in pycharm.

Install the robot plugin in pycharm

Open pycharm and find plugins in the settings of pycharm.

Search for robot in plugins and get the following plugins:

Pycharm can still play like this?

 

Pycharm can still play like this?

 

It can be seen from the figure:

The usage of Robot Framework Support plug-in and IntelliBot plug-in is relatively high.

Downloads are 195.5K and 206.7K respectively

But the IntelliBot plug-in, the latest update time is still in 2016, and it has not been maintained for the past 3 years.

RobotFramework Support is still under maintenance.

In the long run, it is better to choose Robot Framework Support.

Click the Install button to install this plug-in.

After the installation is complete, restart pycharm, and then enter the Preferences page in the figure above.

In the editor's file template, you can see RobotFramework's test case files and keyword files.

Pycharm can still play like this?

 

Among the file types, you can see that the default file suffix of RobotFramework script is .robot

Pycharm can still play like this?

 

Write RobotFramework test cases

1. Create a new project.

Pycharm can still play like this?

 

Pycharm can still play like this?

 

2. Create Robot test case file

Right-click the project name -> New -> Robot File.

The template of the Robot use case will be automatically brought out.

Pycharm can still play like this?

 

3. Write Robot test cases

Use RobotFramework syntax to write corresponding content in different sections.

Pycharm can still play like this?

 

ps:

1) The plug-in itself has its own highlight display. As shown above.

2) Select a keyword and press Ctrl+b to jump directly to the source code of the keyword.

3) There is no automatic completion mechanism for robot keywords. You need to find the keyword name yourself.

4) In the Projects area on the left, there is no keyword display function available.

Configure and run RobotFramework use cases

The robot use case after writing cannot be run.

You need to right-click to select and run in pycharm after a certain configuration.

1) Add External Tools

Add tools to run Robot.

Mainly use robot.exe to run robot scripts.

robot.exe is in the python installation directory.

Pycharm can still play like this?

 

Pycharm can still play like this?

 

2) In the robot file where the test case is located.

Right-click on the blank space -> Extenal Tools -> select run content

Pycharm can still play like this?

 

The results of the operation are as follows:

Pycharm can still play like this?

Recommend a software testing learning exchange group: 785128166, there are shared videos, interview guidance, test materials, mind maps, and videos in the group. They are all dry goods, you can download and watch. Mainly share test foundation, interface test, performance test, automated test, TestOps architecture, Jmeter, LoadRunner, Fiddler, MySql, Linux, resume optimization, interview skills, and actual video data of large-scale test projects. Use every minute and every second of your time to learn to improve yourself, and don't use "no time" to conceal your mental laziness! Try hard while you are young, and give your future self an explanation!

Public number: Programmer Erhei, after paying attention, you can receive a large amount of learning materials for free.

Good things should be shared with friends
 
 

Guess you like

Origin blog.csdn.net/m0_52668874/article/details/114645528