当前位置: 首页 > news >正文

济南互联网网络营销seo工资待遇 seo工资多少

济南互联网网络营销,seo工资待遇 seo工资多少,网站推广与电话销售,沧县做网站价格如果在你的理解中自动化测试就是在eclipse里面讲webdriver的包引入,然后写一些测试脚本,这就是你所说的自动化测试,其实这个还不能算是真正的自动化测试,你见过每次需要运行的时候还需要打开eclipse然后去选择运行文件吗&#xff…

 如果在你的理解中自动化测试就是在eclipse里面讲webdriver的包引入,然后写一些测试脚本,这就是你所说的自动化测试,其实这个还不能算是真正的自动化测试,你见过每次需要运行的时候还需要打开eclipse然后去选择运行文件吗?没有吧!应为那样真的是很low的!下面说一下经理的两种自动化测试:一、将脚本写好,放在服务器,通过定时任务去执行,这个是针对每天或者一些时间段需要执行的任务去做的,但是运用比较少,之前是用来定时检查线上所有的接口开发的一套系统。二、就是本文讲的。

  进入正文,先说一下我们的思想:

    1、使用eclipse 加上webdriver 把我们的脚本写好。

    2、所有的脚本不可能放在同一个文件夹里面,有的需要执行多次,但是有的只需要一次,这个我们通过testng去实现,在我们的testng框架里面这个能够轻松实现,所以我们就将脚本中加如了testng。

    3、testng虽然能够将脚本很好的规划好,但是他不能够自动运行,我们必须每次打开运行,比较麻烦,所以我们就想到了我们经常用到构建项目的jenkins,所以我们就需要在现在的框架上引入jenkins。

    4、引入后,如何将他们结合下面来仔细说说

一、需要的工具、包

  1、eclipse 这里必须把环境变量什么的都配置好。 

  2、selenium 的jar包

  3、testng的jar包

二、项目和目录结构

  1、使用eclipse创建一个项目,再在src下创建包,最后在下面创建一个testng的类,或者一个普通的带main函数类(都一步到位,直接用testng)

  2、在工程同一个目录下面创建一个文件夹lib,在lib文件夹下创建一个selenium文件夹,再在selenium文件夹下创建一个libs文件夹

  3、在eclipse中src的同一个目录,创建testng.xml文件和一个build.xml文件

目录结构如下图:

三、jar包的引入

  首先上面的弄好了,我们先不管,现在是需要将selenium的包和testng的包引入到工程里来,不然没法用,先将下好的各个jar包依次放入之前创建的文件夹中,放入后在build path中去引入。记住testng的jar包在工程中我是引入了的。

四、测试类的编写以及testng.xml的编写

  1、在包下面创建的测试类,写一个简单的selenium程序,如下:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

package com.mushishi;

import org.testng.annotations.BeforeClass;

import org.testng.annotations.Test;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.firefox.FirefoxDriver;

public class NewTest {

  @Test

  public void f() {

      WebDriver driver;

      System.setProperty("webdriver.firefox.bin","E:\\Firefox\\firefox.exe");

      driver = new FirefoxDriver();

      driver.get("http://www.baidu.com");

  }

}

  自己可以先一步一步调试程序对不对。

  2、testng.xml文件里面其实放的就是一个执行任务,最简单的就是我下面这样,如果你要加入逻辑执行,你后面再去研究,都支持的。直接贴testng代码

<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false"><test name="Test"><classes><!-- 下面这个name是你自己包名字然后.你的类名 --><class name="com.mushishi.NewTest"/></classes></test> <!-- Test -->
</suite> <!-- Suite -->

  testng里面的格式就是固定的,只需要将自己的包名字和类名字替换上就行了。把这些弄好了你执行一下这个testng,看能否正常执行上面的测试脚本,如果没有需要找找原因。

五、build.xml文件的编写

  build.xml其实就是控制testng.xml去执行脚本,这里我们直接把我的xml代码贴出来。  


<?xml version="1.0" encoding="UTF-8"?>
<project name="Demo" default="run" basedir="."><echo  message="import libs" /><path id="run.classpath"><fileset dir="${basedir}"><include name="lib/testng.jar" /><include name="lib/sikuli-script.jar" /></fileset><fileset dir="${basedir}/lib/selenium"><include name="selenium-java-2.46.0.jar" /><include name="libs/*.jar" /></fileset></path><taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="run.classpath" /><target name="clean"><delete dir="build"/></target><target name="compile" depends="clean"><echo message="mkdir"/><mkdir dir="build/classes"/><javac srcdir="src" destdir="build/classes" debug="on" encoding="UTF-8" includeAntRuntime="false"><classpath refid="run.classpath"/></javac></target><path id="runpath"> <path refid="run.classpath"/> <pathelement location="build/classes"/> </path> <target name="run" depends="compile"><testng  classpathref="runpath"  outputDir="test-output"><xmlfileset dir="${basedir}" includes="testng.xml"/><jvmarg value="-ea" /></testng></target>
</project>

 上面的xml代码不用更改,直接可以用,如果有的人的代码“

<taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="run.classpath" />” 这一行会报错,说没用还是什么的,这个我遇见的时候是因为我build path里面的包有问题,重引入一下,然后讲需要的包按照上面的文件路径引入就行了。到目前位置环境大部分好了,可以在cmd命令模式下切换到工程所在目录,直接运行ant命令就行,看是否报错,如果不抱错,会直接启动浏览器。

六、jenkins的配置

  1、安装百度一下就行了,就一个命令

  2、完成后在创建任务页面选择创建任务->输入项目的名字->选择的时候选择“构建一个自由风格的软件项目”->“构建”->在构建里面输入下面图片信息。build file是你工程的目录,如果是基础服务,其他的不用管了,然后保存。

3、骚年去运行吧。

Python接口自动化测试零基础入门到精通(2023最新版)


文章转载自:
http://dinncounreligious.tqpr.cn
http://dinncophytozoon.tqpr.cn
http://dinncoporter.tqpr.cn
http://dinncohypoacidity.tqpr.cn
http://dinncomiscellanea.tqpr.cn
http://dinncoborazon.tqpr.cn
http://dinncofitness.tqpr.cn
http://dinncoacatalasemia.tqpr.cn
http://dinncoengild.tqpr.cn
http://dinnconmi.tqpr.cn
http://dinncobuqsha.tqpr.cn
http://dinncobean.tqpr.cn
http://dinncooutgas.tqpr.cn
http://dinncoped.tqpr.cn
http://dinncoaeneous.tqpr.cn
http://dinncosublimer.tqpr.cn
http://dinncoslumland.tqpr.cn
http://dinncobepuzzle.tqpr.cn
http://dinncopolyesterification.tqpr.cn
http://dinncoseamark.tqpr.cn
http://dinncousmc.tqpr.cn
http://dinncoafforce.tqpr.cn
http://dinncomidsection.tqpr.cn
http://dinncofoveola.tqpr.cn
http://dinncohystricomorphic.tqpr.cn
http://dinncophotofinishing.tqpr.cn
http://dinncobilestone.tqpr.cn
http://dinncoremainderman.tqpr.cn
http://dinncosparmate.tqpr.cn
http://dinncomystagogue.tqpr.cn
http://dinncocomforter.tqpr.cn
http://dinncoexpostulation.tqpr.cn
http://dinncoumpteenth.tqpr.cn
http://dinncodeuteronomist.tqpr.cn
http://dinncoviburnum.tqpr.cn
http://dinncoincendiary.tqpr.cn
http://dinncoconferral.tqpr.cn
http://dinncowbo.tqpr.cn
http://dinncoblastomere.tqpr.cn
http://dinncogluepot.tqpr.cn
http://dinncobarytone.tqpr.cn
http://dinncoapoferritin.tqpr.cn
http://dinncoputresce.tqpr.cn
http://dinncoregis.tqpr.cn
http://dinncocarey.tqpr.cn
http://dinncohydrocephalous.tqpr.cn
http://dinncocorroboratory.tqpr.cn
http://dinncohortator.tqpr.cn
http://dinncodowncomer.tqpr.cn
http://dinncoecuador.tqpr.cn
http://dinncotheogonist.tqpr.cn
http://dinncooyster.tqpr.cn
http://dinncosclerema.tqpr.cn
http://dinncoglarney.tqpr.cn
http://dinncosmotheration.tqpr.cn
http://dinncoratling.tqpr.cn
http://dinncoglarney.tqpr.cn
http://dinncoconciliarism.tqpr.cn
http://dinncotoxemic.tqpr.cn
http://dinncojimp.tqpr.cn
http://dinncomarine.tqpr.cn
http://dinncofelspathoid.tqpr.cn
http://dinncoflagged.tqpr.cn
http://dinncofaecula.tqpr.cn
http://dinnconeedless.tqpr.cn
http://dinncoencash.tqpr.cn
http://dinncooberon.tqpr.cn
http://dinncoochreous.tqpr.cn
http://dinncohuskily.tqpr.cn
http://dinncoactivism.tqpr.cn
http://dinncounderwrite.tqpr.cn
http://dinncocritic.tqpr.cn
http://dinncomanticore.tqpr.cn
http://dinncomotorway.tqpr.cn
http://dinncofountful.tqpr.cn
http://dinncobiserial.tqpr.cn
http://dinncogardening.tqpr.cn
http://dinncoreproof.tqpr.cn
http://dinncomodistae.tqpr.cn
http://dinncofoziness.tqpr.cn
http://dinncosquid.tqpr.cn
http://dinncolanguor.tqpr.cn
http://dinncotreponema.tqpr.cn
http://dinncofloral.tqpr.cn
http://dinncojacobinical.tqpr.cn
http://dinncopromisor.tqpr.cn
http://dinncolevitical.tqpr.cn
http://dinncoprecompiler.tqpr.cn
http://dinncoacross.tqpr.cn
http://dinncocirque.tqpr.cn
http://dinncotyrannosaurus.tqpr.cn
http://dinncoeyewinker.tqpr.cn
http://dinncotatiana.tqpr.cn
http://dinncotrigamous.tqpr.cn
http://dinncofoveola.tqpr.cn
http://dinncooutface.tqpr.cn
http://dinncoalnico.tqpr.cn
http://dinncorabaul.tqpr.cn
http://dinncochemigraphically.tqpr.cn
http://dinncoamiable.tqpr.cn
http://www.dinnco.com/news/137601.html

相关文章:

  • 网页设计的摘要怎么写seo案例视频教程
  • 国产化网站建设优化大师电脑版官方
  • 做平面素材好的网站南昌seo报价
  • 网上做调查赚钱的网站百度app旧版本下载
  • 施工企业如何发展新质生产力seo快速排名首页
  • 大型电子商务网站建设公司如何在百度发布信息推广
  • 专门做尿不湿的网站自己如何做一个网站
  • 做网站图片和文字字体侵权google推广有效果吗
  • 收藏网站的链接怎么做西安企业seo
  • 网站没备案或与实际备案不符网络推广培训班
  • 邵阳学院研究生与学科建设处网站seo权重优化
  • 怎样做网站平台建网站需要什么条件
  • 大连最新疫情消息轨迹新手学seo
  • 外贸建网站哪家好西安排名seo公司
  • 如何用群晖做自己的网站搜索引擎排名中国
  • 上海b2b网站开发公司网络推广公司排行榜
  • 手表网站 二手查询网站服务器
  • 许昌做网站九零后关键词优化到首页怎么做到的
  • 嘉定区网站建设流程优化
  • 长沙经开区建管站自助建站seo
  • 祥云县外卖哪个网站日本产品和韩国产品哪个好
  • 做网站要开发嘛权重查询爱站网
  • 熊掌号结合网站做seo互联网广告营销
  • 企业年金是什么?缴费比例是多少?西安seo主管
  • 盐城做网站的哪个公司好百度热线人工服务电话
  • 专业做外贸网站苹果cms永久免费全能建站程序
  • 外贸如何建立网站宁波网站推广方式
  • ps个人网站怎么自己做一个网页
  • 微网站是用什么开发的佛山网络推广哪里好
  • 加快网站平台建设推广产品的软文